Question: How is the probability of photoelectric effect  occurring calculated?
About the article "Photoelectric effect", section "Cross section".

Candidate passages:
The photoelectric effect is one interaction mechanism between photons and atoms.
It is one of 12 theoretically possible interactions.
At the high photon energies comparable to the electron rest energy of , Compton scattering, another process, may take place.
Above twice this () pair production may take place.
Compton scattering and pair production are examples of two other competing mechanisms.
Indeed, even if the photoelectric effect is the favoured reaction for a particular single-photon bound-electron interaction, the result is also subject to statistical processes and is not guaranteed, albeit the photon has certainly disappeared and a bound electron has been excited (usually K or L shell electrons at gamma ray energies).
The probability of the photoelectric effect occurring is measured by the cross section of interaction, σ.
This has been found to be a function of the atomic number of the target atom and photon energy.
A crude approximation, for photon energies above the highest atomic binding energy, is given by:formula_19Here Z is atomic number and "n" is a number which varies between 4 and 5.
(At lower photon energies a characteristic structure with edges appears, K edge, L edges, M edges, etc.)
The obvious interpretation follows that the photoelectric effect rapidly decreases in significance, in the gamma ray region of the spectrum, with increasing photon energy, and that photoelectric effect increases steeply with atomic number.
The corollary is that high-Z materials make good gamma-ray shields, which is the principal reason that lead (Z = 82) is a preferred and ubiquitous gamma radiation shield.
Video camera tubes in the early days of television used the photoelectric effect, for example, Philo Farnsworth's "Image dissector" used a screen charged by the photoelectric effect to transform an optical image into a scanned electronic signal. 
Background radiation doses in the immediate vicinities of particles of high atomic number materials, within the human body, have a small enhancement due to the photoelectric effect. 
His major contributions include pioneer work in the field of ferromagnetism and discovery of the laws and principles of the outer photoelectric effect.
Achievements of Alexander Stoletov include:Magnetism (1871–1872)  Stoletov was the first to show that with the increase of the magnetic field the magnetic susceptibility of iron grows, but then begins to decrease.
Built the curve of the magnetic permeability of ferromagnetics, known as the Stoletov curve.
Developed two new methods for measuring magnetic properties of various materials.
Photoelectric effect (1888–1891)  Studied the outer photoelectric effect, discovered by Hertz in 1887.
Published the results in six works.
Developed quantitative methods for the study of the photoelectric effect.
Discovered the direct proportionality between the intensity of light and the corresponding photo induced current (Stoletov's law)  Discovered the Stoletov constant which defines the ratio between the intensity of the electric current and the gas pressure under the maximum current.
Built the first solar cell based on the outer photoelectric effect and estimated the response time of the photoelectric current.
Discovered the decrease of the solar cell's sensitivity with time (fatigue of solar cells).
Other  Calculated the proportion between electrodynamic and electrostatic units, producing a value very close to the speed of light.  
The photoelectric effect will cause spacecraft exposed to sunlight to develop a positive charge.
This can be a major problem, as other parts of the spacecraft in shadow develop a negative charge from nearby plasma, and the imbalance can discharge through delicate electrical components.
The static charge created by the photoelectric effect is self-limiting, though, because a more highly charged object gives up its electrons less easily.