Probability Theory, 1 December 2023

Problem 2

Probability[X<600,X\[Distributed]GammaDistribution[50,10]]//N

Probability[Z<12,Z\[Distributed]NormalDistribution[10,(10/(Sqrt[50]))]]//N

Problem 4

Note that μ=(1/2) is the expected value of the sample mean. We will write a function that computes P(|((Subscript[T, n])/n)-μ|≥ϵ) for given parameters n and ϵ.

distMoreThanEpsilon[n_,ϵ_]:=1-Probability[(n/2)-n*ϵ<Tn<(n/2)+n*ϵ,Tn\[Distributed]GammaDistribution[n,(1/2)]]

Try it out:

distMoreThanEpsilon[50,0.1]

distMoreThanEpsilon[500,0.1]

Now we will compute a list of values and make a plot.

Plot[{distMoreThanEpsilon[n,0.01],0.01},{n,1,20000},AxesLabel->{"n","probability"}]

To find the smallest n such that P(|((Subscript[T, n])/n)-μ|≥0.01)<0.01, we will use trial and error. Using a loop and an if statement can help us find the desired value of n quickly.

Do[
val=wlln[n,0.01];
If[val<0.01,Print[{n,val}];Break[]],
{n,100,20000,100}]

Do[
val=wlln[n,0.01];
If[val<0.01,Print[{n,val}];Break[]],
{n,16500,16600}]

It looks like n=16589 is the first value of n such that P(|((Subscript[T, n])/n)-μ|≥0.01)<0.01. Let’s confirm this:

wlln[16588,0.01]

wlln[16589,0.01]