In[]:=
n=25;
In[]:=
mu0=
Quantity[22,"Minutes"]
Out[]=
In[]:=
xBar=
Quantity[19.6`,"Minutes"]
Out[]=
In[]:=
σ=
Quantity[9.6`,"Minutes"]
Out[]=
In[]:=
α=0.01
Out[]=
0.01
In[]:=
zStar=
xBar-mu0
σ
n
Out[]=
-1.25
In[]:=
zAlpha=InverseCDF[NormalDistribution[],1-0.01]
Out[]=
2.32635
In[]:=
zStar<=-zAlpha
Out[]=
False
In[]:=
=QuantityDistribution[NormalDistribution[22,9.6],"Minutes"]
Out[]=
QuantityDistributionNormalDistribution[22,9.6],
In[]:=
data=RandomVariate[,10000]
Out[]=
QuantityArray
In[]:=
LocationTest[data,mu0]
Out[]=
0.299545
In[]:=
LocationTest[data,mu0,AlternativeHypothesis->"Less"]
Out[]=
0.850228
In[]:=
SeedRandom[1];data1=RandomVariate[,1000];data2=RandomVariate[QuantityDistribution[NormalDistribution[],"Minutes"],1000]
Out[]=
QuantityArray
In[]:=
Mean[data1]-Mean[data2]
Out[]=
In[]:=
ZTest[{data1,data2},,Quantity[19.6`,"Minutes"],AlternativeHypothesis->"Less"]
2
σ
Out[]=
0.999997
ZTest[{data1,data2},,Quantity[19.6`,"Minutes"],AlternativeHypothesis->"Less"]
2
σ