Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
. learn concepts ofnull and altemativc h}?othescs, tcst statistic, level ofsignificancc
and p-value
. conduct tests for a population lrlean based on:
o a sample liom a nomal populatiol ofkflown variance
o a samplc from a normal population ofunl<iown vadance
o a large sample from any population
. conduct l-tail and 2-tail tests
. use oft-test
#1. Introduction
Olten in scientific enquiry a statement conceming a population palametcr is put forwanJ as a
statistical hypotlesis. Its validity is then tcsted, hrsed ofl obsrrvctrorr made from ran.lom
samples titken from thc population.
Definirton :
A slatistical hypothesis is a assertion or (onjccture conccrning onc or more population.
ln hpoth€sis testing, we usually takc a random sample lrom the population ulijer invcstigation
and use the information contai[ed in lhis sample to deciclc whe{licr a hlpothcsis is likely
to bc
tnre or false.
c29 I
&le : If null hypothesis H0 is rejected, the conclusion is that some other hypothesis ,
known as altemative hypothesis is acccpted. There are lhrcc possible Ht that conccm
us.
Critical region The set of values ofthe test statistic for which Ho is rejected is known
as tho critical region. It depends on the t)?e oftest and the signilicance
level. The boundaries of thc critical region are called the critical
values-
Significance lcvel (rr. x 100%) - o is the probability of rejecting H6 when Hg is in
fact true. lt must be chosen, before the tcst is conducted,
to aid in deciding whether to accept or rc.iect H0. Note
that o is the total probabilify in the critical region.
NqEI
When the levcl of significance is not given, a 57o level is nolmally uscd.
As examplg the critical regions (shaded) for a z-test lvith a siqdficance levcl of
al1 5olo
((l:0.05) for the 3 dillerent types oftests are illustratei below.
N9l!9: that the critical values can be obtained tiom the GC or thc tables in MF 15. This will
be
c29 Z
dcrDonstratcd in the examplcs.
p - value -. thr: lowest level ofsignificance at which Hg is rcjected. Once the p-r,alue has
been dctermincd, wc do not rcjcct H0 at {a x 100% level if p-valuc > c. we
reject II0 at (1 x 1007o level ifp-value:, n .
Two-tailed
ls the test
statistic positive
or negative?
P-value = P-value =
h,,r'ice the twice the P-value -
P-Value- area area to area to area to
to the left of the left of the right of the right of
the test the test the test the test
statistic statistic statistic. statistic
Step 2 Detcrminc the tlpe oftest (one-tailed or two-tailed) and selcct the signilicance
levcl (iI
not given)_
Step 4 Caiculatc the value oflhc test statistics and tlicp value, basod on sampLc data. This calr
be done with the GC_
c29 3
.tt, 5 : (Two methods to decide)
(1) R'jject Ho ifthep-value :: o(at significancc level Cr x 100o/o).
Do not reject Ho if the p-value > o (at significance level d x 1009/0)-
(2) Reject H6 if the test statistic lies in lhe critical region (at significance level cx
100%). Otherwise, do dot reject Ho (at significance level <r x 10070).
Ncvcr sa] rejecl Hr. Slale conclusion in conlexl.
Useful Formulae
1)Sample mean
t,
- It,' ,t
n
2) In the lbllowing cases, ifpopulation varirnc. ol is unklo*n, replcce o2 with .-' (unbiascd
variance estimate). [Jse ary of the following formulae according to given irfonl1ation.
c29-4
(ii) A largc sample frona nonnal
population, population variance .' 2 is -r-N( )
u[known (conlpare this to the usc of
l-test whcre samplc size is small.)
whcre s2 is the unbiascd
variance estimate.
(iii) A large samplc (, I 50 as a guide) By CLT, (r)
from any populatiot (not Normal)
(l) t-rv( ,:i - _i
when o2 krown,
(2) - - 1/(
when o2 unhown, where
s' is lhe unbiased var-iance
esfimate-
Erarnplc I:
'Ihc lengths of mctal bars produccd by a particular machire arc nonnally dislributed with mean
length 420 cl}I and staodard deviation l2 cnr Thc rn:chrne Ls servrcetl, ritcr wlrich a sar'plc of
lr){r b,lrs gr\e\ I tcJn lcnAth ol 4/ r cm
Is therc cviclencc, at thc 5o4 lcvcl , ofa chnngc io the m(jan lenglh ofthc bam producerl by lhe
machine, assuming tltat the standard dcviation rcmains thc same ,l
JSolnl:
Z-TesL Z-Test,
I nPt: nEt s
1rr:428
I $+428
s! 12 F=.8124193597
n: 169 rr= 1e0
E:EM {rrD )uo I
Calculele Eraur
Retum to the Z-Tcst screen above and select <Draw> instead of<Calculatc> to obtain a
drawing ofthe arca associated with thep-value.
Step 5:
Sincep-value: , w€
and conclude that therc is
that the mean lcngth ofmetal bars has changed
itt F=-012i|
inuHorn(8. 975)
ffi*3TEH*.
2: noFPia I cdf (
3: i nuNorm (
4: tpdft
5: Lcdf(
6: )tu Fdf (
TiHzcdf(
Thus Cntrcal Rcgion: Rrjcct H" if 2., _ or zdn >
Step 5:
Do it yourself
Re-do Example I on your own but now using a significant level of 37o. Which pafts of the
steps arc the same and which parts need changcs? Did you get the samc conclusion? Why?
c29 6
Example 2
In a population of chickcns fiom a particular farmer, thc distribution of t_he mass ot a chrcken
has mean p kg and standard deviation o kg. Tho farmer claims that the mean mass is l.?5 kg. A
random sample of 100 chickens is taken fron thc population_ The mean mass for the sampie is
denoted hv ,Y . Srarc thc apprnximate distnbution ol X
The sarnple values are summarised by
l,,c = lS0- l, lr. - 401.7,1 , where,r kg is the mass of a
chicken. 'rest, at 17o levcl ofsignificancc, whether the farmer has underostimated the mean mass
of the chickens, stating whether you are using a one-tailed or a two-tailed test and statc your
conclusion clear-ly-
lSolnl:
Stcp 1: To test IIo: / = 1.75
against Hl: ll >
(: ' f
I nbiascd \arinrce (srimarc r ,'I rl"
ft , l
)
+ s = 0.88401t99
Step 4:
IffitiPg'. *=
Z-Tesf, Z-Test-
u)l.75
z=.576S643937
o: .88498952755... P=. ?82S154885
*=1. 801
R: 1. BrAl n=168
n! l0B
f;t[,:rltgffi"
Stcp 5:
c29 7
Alternatively (usc critical reqion)
Step 5:
Sinc€ the test statistic ztd : and cllnchrde thrr
there is that the farmer has underestimated the mean nass ofthe
chickens at
I)o it yourself?
What if the farmer claims that the mean mass is l.85kg? Repeat Example 2 on your own but
this time test at 27o level ofsignificarce, whether the fanner has unde.estimated the mean mass
ofthe chickens
c29 {t
Example 3 :
A cedain ricc company packs rice in bags which the company claims contain l0 kg ofrice each.
on average. A random sample of80 bags is examined and thc mass, r kg, ofthe contents of each
bag is deternrined. Ir is found thar tOy =,Zl.Z, l0)' =85.1. Tr*r at 5% level of
l{t I("
significance whethcr the manufacturcr is overstating the avcrage nass of the contents ofa bag_
ISolnl:
Step 1: Let p derote the average mass ofthe contorts ofa bag.
To test H0: l=
against H1 : p<
Step 2: One-tailed test at 5% level. (u ..0.05)
SarnDle data:
.
samPlc mean
fr, ,)
r z=-- |.
n
-.> s = 0.9'/98'.7214
u,,d.r He.'r)x Nf )
Step 4i
Z-Test Z-Test
InPt i DEt a FtFlEt s( 1g
t-r0: lLt z= -3. 18f,518786
n: .97987?44867... F=9.5623865E -4
x: 9. 66 x=9. 66
n: 88 n=80
Lt: +1I 0 I )r'.r
UElculaLe DrsLJ I
Sincep value = and coicludc that therc is
,et , that the ma ul'acturcr is
overstating tlie avcrage lnitss ofthe cottents ola blrg.
c)9 9
Alternatively (use criaical region)
whv
inuHorF ( 8. 65 o.os?
Step 5:
Do it yours€lf
What if in Example 3, you are asked to test at 5% level ofsignificance whether the manufacturer
is understating the average mass of the contents of a bag? Which parts of the test will change?
What $.ill be your conclusion then?
c29 r0
[x:tmple 4 :
Thc random variable ,l1 has a normal distribution with mean p (unknown) and variance o 2
(known). To test thc null hypothesis H0: p: po, a raldom sanple ofn observations
ofxis
taken, and the sample mean is t . Find, ir te.ms ofFo , o and r, the set ofvalues of i
which
will result in I l0 not being rejected in favour of Hl : p < Fo at the 20% level of significance.
[Solnl:
Ho: P: lrl
Hr:p<po
At ofsignificancc. d.:
If Ho is not rejected, p-value >
n& d DRHtd
pdf (
invHcrm(4. 82)
1: nonna l
2: iroFr'lalcdf ( I
Si nuHorr'i (
4: tFdf (
5: tcdft
5: XzFdf(
7+XZcdf(
Thus thc criticai valuc: , i-e. area to the lell ol'this value will be {
xpa
Therefore, the ser or vatucs or ; which will result in H6 not being rcjected in favour of I-Il is
lr
']re R r 7,, 2.o-il7+!.
I J')
Do it yoursclf
What would the set ofvalues of ; be ifthe outcome ofthc test is to reject [Io instead?
c29 1t
Example 5
The table below shows the number ofcell phoncs owncd by 100 households.
lSolnl:
IC
?9
Step 1: Store the values of)r (number ofcell phones) in Ll lt
and the values of/(number of households) in L2. 6
tU {7} =
Note (important):
)
(I S, shown in tho GC is the unbiased estinated population standard deviation s.
(2) o, shown in thc CC is the sanple standard deviation.
(3) If the lists L I and L2 are selected in the wrong order, you will get r : l5 instead of 100.
c29 12
Let p denote thc avqage numbcr ofcell phones owned bya family.
by
(
undcr Ha. )f - Ni
\
Sincep :
ard conclude that there is to
claim that the population mean is not equal to 1.60
at ofsignil'icancc.
z,e:0.698'
Do it yourself
Wrat ifanother sct ofvalues wcrc addcd and that thc nufiber ofhouseholds with 5 handphones
wcre changcd as fbllows?
c29 r3
(4.2) Use of t-Test in Signiflcance testins for nopulation mean. u. usine a small
sample(n < 30) of unknown variance.
THE I- DISTRIBUTION
DtrFINITION
The l-distribution is s],rnmctical, bell-shaped, and similar to the standard normal curve. [t
differs from the standard nonnal curvc, howeveq in that it has an additional parameter, called
degrees of freedom, which changes its shape.
Nole that the smaller the v , the flattcr thc shape of the distribution, resulting in greater arca tn
the tails ofthe distribution
c29 - 14
RELATIONSHIP TO T HE NORMAL CURVE
The standard nonnal curve is a special case of the /-distribution whcn y ) .o. For practical
purposes, the /-distribution approaches the standard nomal distribution relatively quickly,
such
that wherl v = 30 the two are alnost idcntical.
2. The I distribution is generally bell-shaped. but with smallcr sample sizes showing
increased variability (flatter). In other words, thc dist.ibution is liss peaked than
romal distribution and with thicker tails_ As the sarnple size incrcases, the distribution
i
approaches a nonnal distribution. For,, > 30, the differences are negligiblc.
Notation:
-{- (v) means that the variable Xhas a l-distribution with v degrccs offreetlom-
In general, the degrees of frccdom is the nuntber ofvalues that can vary
afler c€rtain restrictions have been imposed on all values.
c29 15
Performine thc ,-tcst
1.3.2 12.2 11.4 14.5 11.6 t2.9 t2_4 l0_3 12.3 11.8 11.0 r3.0
l2.l D.6
StatiDg any assumptiorl necessary for validity, test the manufacturer's claim at the l0(%
significancc lcvr:l using r r-te.l.
lSolnl:
Lct F denotes the populatior mean timc taken to heat 500 litres of water f.om lo'C to -l-5'L .
,'\.ssumption: The time taken is rormally distributed.
To test H0: l=
against Ht: l>
cz9 16
Step 3: Select <2> to select T-Test.
Do it yourclf
llepeat or your own Example 6 with thc following sot ofvalues instead.
13.2 12.2 ll_4 l4.s ll.6 12_9 12.4 t0.l 12.3 lt.8 r0-3 t2-0
l0-l 9.6 9-9
c29 t7
Example 7
A machine is programmcd to fill containers with 20009 each of a c€rtain t)pe of powder
contents. A sample of eight containers is selected at random from a largc batch. The containcrs
have powdor contents with masses r grams which are sunmarized by
| (r - 2000) = 2'7 .4 and
:(' 2ooo)' = 231.52.
Assuming a nomal distribution for the masses of the contents, show that there is significance
ovidence, at the 57o levol, thal the machine is ove#illing the containers.
lSolnl:
To test Il0 : / :
against Hl: ll>
Onc-tailed t-test at lcvcl. ((!: )
T-Test T-Test
InPLiEEtE EiGrEl !1)2000
LTg: 2UUU t=2. 1686993
x: ?88J.425 F=. 8333725451
5x:4.4669 x=2883.425
n:8 5x=4.4669
iiliiiii ffi,
Sinccp-value: aod concludc that there is
at significance level that tho machinc is overfilling th()
containcrs
c29 t8
Alternativelv (use critical resiont
R€fer to the table of c.itical values for the t-distuibution in MF15, under column z:
alld row y = 7 , we obtain 1-895 as the critical value.
c29 - t9
Example 8
'Family' packs of bacon slices are sold in 1.5 kg packs. A sample of 12 packs was selected at
random and the masses, measured in kg noted. The following results were obtained:
f r=17.S1, t"' = 26-4351 . Assuming that the masses of the packs follow a Normal
distribution with variance o'/ , test at lyo level whether thc packs are significantly underweight
(a) if o? is urknown
(b) if o'z:0.0003
[Soln]:
Let p donote the average mass ofthc packs ofbacon slices.
To test H0: /=
against HI: l<
One-tailed test at level. (c:
Samplqdata: sample mean r I'.
z-' - JJJI
n12
r
1 aga2
(a) Sincc a small sample is drawn from a Normal distrit ution :rnd o? is unklorvrr, we use a
t- tcst.
illl:8"'" *
T-Test T-Tes'l:
B<1-5
t= -3.498868856
x: 1 . 4842 P= -Pg249E6979
5x: . 015643 *=1.4842
n: 12 5x=.615643
lr: +rr 0 EE )rrr n=12
CalcuI ate Orar,r I t: -3-1989
c29 - 20
Alternativelv (usc critical reqion)
Refer to the table ofcdtical values for the t-distribution in MFl5, under columnp
and row v - ,\aeobtain2?18 asthccritical value
Thereforc Critical Rcgron: rcjcct Ho if tr"i <
Note: o =.,6.0003 =0.01732..... ( 1'or the result below r,6.0003 has bcen used;
Z-Test Z-Test
F,nnE p.t1.5
l[!t:8"t"
. g1?3?858867
z= -J. 16
't: I . 4842 F=l.4891166E -4
I: x=t .4842
u: 1? n=12
Lr:+ur-EGI ]Br
LE l Cul EtEr UF.ir.l
!:-3.16
Since:,..,: ,we
and concludc that there is at
signilicance level that the packs arc
srgnifi cantly undefweight_
c29 - 2I
Summarw
(D population is normally
distributed, population variance .Y - 7v(lo.:)
.' 2 i" knar*n-
o2 koo*r4
n t;
X-p"
(2)X - ir/(pn,-) when o'
n
unknown, where s is the unbiased
variance estimate.
End ofChapter
c29 -22