(* Mathematica program for Problem 7.4

  date : 28/10/2009
  author: Jorge C. Romão
  email : jorge.romao@ist.utl.pt
*)

(* Definition of the probability function *)

probability=Function[{l,m},SphericalPlot3D[
 Abs[SphericalHarmonicY[l, m, theta, phi]], {theta, 0, Pi}, {phi, 0, 
   2 Pi}]];

(* |Y_ {00}| *)
probability[0,0]

(* |Y_ {11}| *)
probability[1,1]

(* |Y_ {10}| *)
probability[1,0]

(* |Y_ {1,-1}| *)
probability[1,-1]