(* Lines like this, deliminated by asterisks and parentheses, denote comments.*)
(* Calculate the expectation of the variance of 2n+1 unit exponentials.*)
pe[n_]:=Integrate[x Exp[-(n+1) x](1-Exp[-x])^n (2 n+1)!/(n! n!),{x,0,Infinity}]
(* Make a table of the first 6 of these, that is sample sizes 1,3,5,7,9,11. *)
Table[N[pe[n]],{n,0,5}]
(* These should be estimating the median of the unit exponential. *)
N[Log[2]]
