Orbitals, and Probability Patterns
Key Questions

The electron orbitals are filled in the same manner that they appear on the periodic table.
H is
#1s^1# and He represents#1s^2#
Li is#2s^1# and Be represent#2s^2#
B is#2p^1# , C is#2p^2# , N is#2p^3# , and O, and F until Ne represents#2p^6# Continuing down the periodic table you can fill each orbital by the row, block and column of the periodic table.
1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p
The order of orbital filling follows directly from the organization of the periodic table.
Hear is a YouTube Video on Electron Configurations that may help.
I hope this was helpful.
SMARTERTEACHER 
It just turned out that way. We can't define equations to influence nature, only describe it.
You can imagine anything you want for what "determines" the probability distribution, but ultimately, nature turned out that way, and we described these orbitals afterthefact.
DISCLAIMER: This is going to be a long answer.
WHAT IS THE WAVE FUNCTION FOR AN ORBITAL?
Erwin Schrodinger published the wave function
#psi# , which describes the state of a quantum mechanical system.For each orbital, its radial density distribution describes the regions with particular probabilities for finding an electron in that particular orbital.
In general, the wave function for spherical harmonics coordinates can be written as:
#\mathbf(psi_(nlm_l)(r,theta,phi) = R_(nl)(r)Y_(l)^(m_l)(theta,phi))# where:
#r# ,#theta# , and#phi# are spherical coordinates:
#psi_(nlm_l)# is a wave function that can be constructed to describe what the orbital's electron distribution looks like.
It depends on the quantum numbers
#\mathbf(n)# ,#\mathbf(l)# , and#\mathbf(m_l)# .#R_(nl)# is the radial component of the wave function, describing the variation in the distance from the center of the orbital (the radius!).
It depends on the quantum numbers
#\mathbf(n)# and#\mathbf(l)# .#Y_(l)^(m_l)# is the angular component of the wave function, describing the aspects of the orbital electron distribution that can possibly give it a nonspherical shape.
It depends on the quantum numbers
#\mathbf(l)# and#\mathbf(m_l)# .OKAY, WHAT DOES IT HAVE TO DO WITH PROBABILITY PATTERNS??
Focus on the
#R_(nl)(r)# portion of#psi# .When we plot the radial density distribution (or "probability pattern") of an orbital, we plot
#4pir^2(R_(nl)(r))^2# vs.#r# in units of#a_0 = 5.29177xx10^(11) "m"# (Bohr radii) like so:The wave functions themselves, as we defined them, generate these "probability patterns".
HOW DO I KNOW YOU'RE NOT MAKING THIS UP?
Well, with an example, I guess. This will give a result that should prove familiar.
The simplest example of an orbital wave function (used by
#"Real Chemists"^"TM"# , folks!) is the one for the#\mathbf(1s)# orbital, which happens to be:#color(blue)(psi_(1s) = R_(10)(r)Y_(0)^(0)(theta,phi)# #= stackrel(R_(10)(r))overbrace((2Z^"3/2")/(a_0^"3/2")e^("Zr/"a_0))*stackrel(Y_(0)^(0)(theta,phi))overbrace(1/sqrt(4pi))# #= color(blue)(1/sqrt(pi) (Z/(a_0))^"3/2" e^("Zr/"a_0))# where:
#Z# is the atomic number of the atom.#a_0# is the same Bohr radius we just defined as#5.29177xx10^(11) "m"# .
In order to plot the "probability pattern", we have to grab what we need and turn it into
#4pir^2(R_(nl)(r))^2# .#4pir^2(R_(nl)(r))^2# #= 4pir^2(stackrel(R_(nl)(r))overbrace((2Z^"3/2")/(a_0^"3/2")e^("Zr/"a_0)))^2# #= 4pir^2(4Z^3)/(a_0^3)e^("2Zr/"a_0)# #=> color(red)(4pir^2(R_(nl)(r))^2 = 16pi(Z/(a_0))^3r^2e^("2Zr/"a_0))# This is the function that corresponds to the red curve in the diagram above.
Now, since we have the plot for
#4pir^2R_(nl)^2(r)# vs.#r# , one thing we can do is find the region of highest electron density, which is just the highest point in the#1s# orbital graph above.So...
 Take the derivative with respect to
#r# .  Set it equal to
#0# , since the peak has a slope of#0# .
#=> 16pi(Z/(a_0))^3d/(dr)[r^2e^("2Zr/"a_0)]# Utilize the product rule:
#=> 16pi(Z/(a_0))^3[(2Z)/(a_0)r^2e^("2Zr/"a_0) + 2re^("2Zr/"a_0)]# Now setting it equal to
#0# and crossing out nonzero terms:#0 = cancel(16pi(Z/(a_0))^3)[(2Z)/(a_0)r^2e^("2Zr/"a_0) + 2re^("2Zr/"a_0)]# #0 = (2Z)/(a_0)r^2e^("2Zr/"a_0) + 2re^("2Zr/"a_0)# Although
#e^(x)# reaches#0# at very large#r# , it is nonzero for small#r# , and we are at very small#r# . So...#0 = ((2Z)/(a_0)r^2 + 2r)cancel(e^("2Zr/"a_0))# #0 = (2Z)/(a_0)r^2 + 2r# #cancel(2)r = (cancel(2)Z)/(a_0)r^2# #r = (Z)/(a_0)r^2 => color(green)(r = (a_0)/Z)# ...for a Hydrogenlike atom (e.g.
#"He"^(+)# ,#"Li"^(2+)# , etc).But for the Hydrogen atom,
#Z = 1# , so#\mathbf(color(blue)(r = a_0 = 5.29177xx10^(11) "m"))# .That tells us that the electron in the
#1s# orbital of Hydrogen atom is most often one bohr radius distance away from the center of the nucleus, just as we would expect. Great!