0 ratings0% found this document useful (0 votes) 19 views36 pagesStats 5th Module
statiscs 5th module with brief information
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Introduction
Hypothesis testing
Hypothesis testing is the method of testing
whether claims or. hypotheses regarding a
population are likely to be true.
The purpose of hypothesis testing is to
determine whether there is enough statistical
evidence in favor of a certain belief, or
hypothesis, about a parameter.
© Scanned with OKEN ScannerExample
° Is a new drug effective in curing a certain
disease?
—A sample of patients is randomly selected. Half of
them are given the new drug while the other half are
given the old drug. The conditions of the patients are
then measured and compared.
* Hypothesis tests are used heavily in areas like
marketing,
— To determine whether a certain type of advertisement
is effective
— Whether a certain group of individuals buys more or
less of your product now compared to last year.
© Scanned with OKEN ScannerDetermining the range at which a bat can
detect an insect by echo
Deciding whether hospital carpeting results in
more infections
Selecting the best means to stop smoking
To see which weight-loss program is more
effective with a certain group of people
© Scanned with OKEN Scanner* A null hypothesis is a type of hypothesis used in
statistics that proposes that there is no. difference
between certain characteristics of a population
* Alternative hypothesis is a type of hypothesis
used in statistics that proposes that there is
difference between certain characteristics of a
population. A hypothesis (often composite)
associated with a theory one would like to test. It
is denoted by H,
* Researchers work to reject, _nullify or disprove
the null hypothesis. Alternative Hypothesis also
known as Researchers Hypothesis.
© Scanned with OKEN Scanner———
Example:
To check the water quality of a river for one
year, the researchers are doing the observation.
As per the null hypothesis, there is no change in
water quality in the first half of the year .as
compared to the second _ half. But in the
alternative hypothesis, the quality of water is
poor in the second half when observed.
© Scanned with OKEN Scanner* A medical trial is conducted to test whether or
not a new medicine reduces cholesterol by
25%. State the null and _ alternative
hypotheses.
— Ho: The drug reduces cholesterol by 25%. p = 0.25
: The drug does not reduce cholesterol by
25%. p # 0.25
* We want_to test.whether the mean height of
eighth graders is more than 66 6 inches. State
the null and alternative hypotheses.
— Hy : = 66
—H,:>66
———-
© Scanned with OKEN Scanner* To test if college students take less than five
years to graduate from college, on the
average.
— HO: Average time taken by student to graduate
from college is 5 years
— HO: M=5 years
— H1: Average time taken by student to graduate
from college is less than 5 years
—H1:M<5 years
© Scanned with OKEN Scanner* To test if it takes fewer than 45 minutes to
teach a lesson plan
— HO: Average time to teach a lesson planis 45%
minutes fe
— HO: M=45 mins
— H1: Average time to teach a lesson plan is fewer
than 45 minutes
—H1:M <45 mins
$e .
be US mo
g Fe8S
11
© Scanned with OKEN Scanner* Inan issue of U.S. News and World Report, an article
on school standards stated that about half of all
students in France, Germany, and Israel take
advanced placement exams and a third pass. The
same article stated that 6.6% of U.S. students take
advanced placement exams and 4.4% pass. Test if the
percentage of U.S. students who take advanced
placement exams is more than 6.6%. State the null
and alternative hypotheses.
HO: The percentage of U.S. students who take advanced
placement exams is 6.6% a ¢ = Let
HO: P = 6.6%
— H1: The percentage of U.S. students who take advanced
placement exams is more than 6.6% wep 2oeh
H1: P > 6.6%
© Scanned with OKEN Scanner* Ona state driver’s test, about 40% pass the test
on the first try. We want to test if more than
40% pass on the first try. State null and
alternative hypothesis.
— HO: Percentage of people pass the driver's test on
their first try is 40% He $ p= Uo%
— HO: P = 40%
— H1: Percentage of people pass the driver's test on
their first try is more than 40%
40%> Ky 2 p> 10%
cen
13
© Scanned with OKEN Scanner| Gr oy,
f Cevdreadlfche? ja greeted ysl * cadradisln
| * Null hypothesis: 1. > "SS “ia, Hote &
\ be Bo how Ay .
| l\ — A hypothesis associated with a contradiction to a
i || theory one would like to test. It fs denoted by H,
—H): p= 66
¢ Alternative hypothesis:
— A hypothesis (often composite) associated with a
theory one would like to test. It is denoted by H,
; nc G Gh) girecialid unlicr
—H,: > 66 icdey oe fe ee By as ctl yf
© Scanned with OKEN Scannera
A jon
sac mapas oll UE ee “ ce _
Type | Error: ° rota ee a es
We reject the null hypothesis when the null is
true.
Put another way,
a = Probability of Type | error =
P(rejecting Hy | Hy is true)
Typical values chosen for a are 0.05 or 0.1
© Scanned with OKEN ScannerType I Error: remap m (He thee
We do not reject the null hypothesis when it is
not true.
Put another way,
B = Probability of Type II error =
P(do not reject H, | H, is false)
xo Vel treKe
fsthess wshur a
= safe rho woh ey = Arse one)
= &C Typalerss)
19
© Scanned with OKEN Scanner* The Jury is instructed to assume the person is
innocent, and only decide that the person is
guilty if the evidence convinces them of such.
Hence favored assumption is the person is
innocent ,
¢ When there is a favored assumption, the
presumed innocence of the person in this
case, and the assumption is true, but the jury
decides it is false and declares that the person
is guilty, we have a so-called Type | error
21
© Scanned with OKEN Scanner* Conversely,
if the favored assumption is false,
i.e., the person is really guilty, but the jury
ae eee crv mane
declares that it is true, that is that the person
is innocent,
error.
then we have a so-called Type II
* Thus,
22
© scanned with OKEN Scanner* The favored assumption is that the person is
guilty. In this case the roles of the Type | and
Type Il errors would reverse to yield the
following table
© scanned with OKEN Scanner2 ol
. re 4 are)
* Size: sty a
— The size of a test is the probability of incorrectly
rejecting the null hypothesis if it is true. Probability of
rejecting Hy even when H, is true. Hence we can say
that probability of committing a Type | error is size of
a test. Size is denoted by a
— a = P(Reject H,| H, is true)
* Power: sey boa 1 # =F
— The power of a test is the probability of correctly
rejecting the null hypothesis if it is false. Probability of
rejecting Hy even when Hy is true. Hence we can say
that probability of not committing a Type Ilerror is
power of a test. -
+1 -B = P(Rejecting H, | H, is false)
roped [ne swftsa)
24
© Scanned with OKEN ScannerRelation between Type II Error and Power
We know that
Type Il Error = Do not reject Hy when H, is false
Hence
P(Type II Error) = P( Do not reject Hg | Ho is false)
B = P( Do not reject Hy | Hg is false) pe ab (aktfat H. / he Bille)
= 1 -P( Reject Hy | Hp is false) A= aeons
# Pecan (~ f
= 1 - Power = (— PCTyfsd omren)
Hence Power = 1-8
| i.e. Power = 1— P(Type Il Error)
| 25
© Scanned with OKEN ScannerExample
Let p be the probability that a coin will fall, head
in single toss. In order to test the hypothesis H, :
P=0.5 the coin is tossed 6 times and H, is
rejected if more than 4 heads are obtained. Find
the size of the test. If H, : P=1/3 find the power
26
© Scanned with OKEN ScannerSolution:
Let X denotes number of head when a coin is
tossed
Given hypothesis: Hy : p = 0.5 and H,: p = 1/3
Rejection condition: 2X > 4
n=6
Size = P(Reject H, | H, is true)
P(2X > 4| Hy is true)
2x4
ae ~ PCr rte | Me oo Te)
FE H> AH Me ee)
27
© Scanned with OKEN Scanner=P (2X >4| p=0.5)
X~ B (1, Po)
=> IX ~ B(6, Po)
P( 2X > 4) = P (X=5)+P(X=6)
= §C,p54o54+5C.poq&s
= 6197p + Poe
= 6(0.5)5(1-0.5)+(0.5)6
=7(0.5)6
=0.109
yr b(t be
=> 2K
1 (2x?
map ( 6)b-)
= Sep EPA
2 kar #
yu
&(os) re
3609)
O.(ot
host
pcxe st rus)
© Scanned with OKEN Scanner* Power = P(Reject Hy | H, is true)
Get Ht atone)
=PQX> 4] pata) fom 8”
X* 8 (1, Pa) peaes 2 432 POR De OO
=> 2X ~ B(6, P,) = ob + S48 pha
4)=P (X=5)+P(X=6) = 6b y ae ec
= ®C.pq®54+5C.poqes ae
= 6p,°q; + p,° oe fan oo
= 6(1/3)°(2/3)+(1/3)®
=0.0178
Hence P(Type II Error) = 1— 0.0178 = 0.9822
29
© Scanned with OKEN Scanner5 whidh UL
test Abc f&
a values | ruyfeatharis »
ay ee a be apd Be all Rye
* Region of Acceptance
— The set of values of the test statistic for which we
fail to reject the null hypothesis
Region of Relection/ Critica Region
— The set of values of the test statistic for which we
reject the null hypothesis
e ti mshatdl Value delinnrtirg sl pugi
Critical ee A eae qd ut Bipatochs,
— The threshold value delimiting the region of
acceptance and rejection of the null hypothesis
30
© Scanned with OKEN Scanneryee
Uwe Rede
<< Mean, Median, Mode
NN a
Acceptancé Region
Critical ae
Region
Critical Values
31
© scanned with OKEN Scanner2 dgavodt “poor
solaron | ered
o glue sad
_»te®
. oge giddy at
Level of significance “<7;
Level of significance, or significance level, refers
to a criterion of judgment upon which a decision
is made regarding the value stated ina null
hypothesis. The criterion is based on the
probability of obtaining a statistic measured in a
sample if the value stated in the null hypothesis
were true, _, am ow Sage paEtisics
Maximum probability of rejecting Hy even when
Hy is true 7
The criterion or level of significance is typically
set at 5%. That means we are 95% confident that
the results have not occurred by chance
gaye ey 32
© Scanned with OKEN ScannerP Value 5 joHe porta a Seb “SG ss ral hypo 8
ghuw H
° Ap value is the probability of obtaining a
sample outcome, given that the value stated
in the null hypothesis is true. The p value for
obtaining a sample outcome is compared to
the level of significance.
* Measure of the strength of evidence the
sample data provides against the null
hypothesis He eee Lor afin, Se
* P—val = p = P(Z > Z,a) 7 Wh ~ bo P(e ™ Zay)
Haosurn of Abe Py 1 Gtne daringte late prretes Aquat The
mruald teypothud —— P-value = p= P(C2™ Zag)
plese) Zo 3
sutcawt, At «
© Scanned with OKEN Scanner: a ohwlh
Interpretation: pe pened ane
* When the p value is less than 5% (p < .05), we reject the
null hypothesis.
* We will refer to p< .05 as the criterion for deciding to reject
the null hypothesis, 2 #< °° epee,
* Note that when p = .05, the decision is also to reject the
null hypothesis. P00, Ging, Gaciaiow By ales Ke Sypet
* When the p value is greater t an 5% (p > .05), we do not
reject the null hypothesis. => 0-05 > vet reject,
* The decision to reject or retain the null hypothesis is called
ance. When the p value is less than .05, we reach
significance; the decision is to reject the null hypothesis.
When the p value is greater than .05, we fail to reach
significance; the decision is to not reject the null
hypothesis. Pr oeeS wu visach Ayrifeowa, Ae
ition 2040 sefest ths WEE typaitoeAe
toh the be ee dan
aif Ho Jrs2eth vy 4 7 34
se fail ho Toes Ly
Bo" pg rags We melt
© Scanned with OKEN Scanner° Level of Significance
Value (in the shaded
ion) will lead to
Hypothesis
¢ P value
zobs
tejection of Null”
Mean’
alpha
Xt
Critical Value
35,
© scanned with OKEN ScannerTypes of test
* One Tailed test
* A one-tailed test is a statistical test in which
the critical area of a distribution is one-
sided _so that it is either greater than or less
than a certain value, but not both. If the
sample being tested falls into the one-
sided critical area, the alternative hypothesis
will be accepted instead of the null
hypothesis.
36
© Scanned with OKEN Scanner* Two-tailed test
* A two-tailed test is a method in which tl
critical area of a distribution is two-
sided and tests whether a sample is greater ,*
than or less than a certain range of values. It is
cs
lorae Petey
used i in null-hypothesis testing and testing for
statistical significance.
37
© Scanned with OKEN ScannerHow to determine?
* The type of test is determined by the
Alternative Hypothesis ( H, )
* Left Tailed Test
—_ Fi Left-tailed test.
— H,: parameter < value
* Right Tailed Test i>
—H,: parameter > value
* Two Tailed Test_
— H,: parameter not equal value
BY
” “Two-tailed test
b
it
ago aay sv age
SValuaspe
Lt es > RigshY 38
U? Bereottircyabe 2 HS pomustaS dee
© Scanned with OKEN ScannerSTEP 1: Set up hypotheses and select
the level of significance a.
— Ho: Null hypothesis (no change, no difference); H,:
Research hypothesis (investigator's belief); a =0.05
— The research or alternative hypothesis can take one of
three forms. 1 07 (gumporedars Upp al at
— Hy: W> Wo, where py is the comparator or null value
and an increase is hypothesized - this type of test is
called an upper-tailed test;
— Hy! 1. < Uy, where a decrease is hypothesized and this :
is called a lower-tailed test; or 4° 4+ Ae => ctecrenas 2 hypetiais
_ 1b # HB o, where a difference is hypothesized and this
is called a two-tailed test. wae Jn hyfettasis.o) thi
Caled @ 92 hile est
39
© Scanned with OKEN Scanner* STEP 2: Select the appropriate test statistic.
— The test statistic is a single number that
summarizes the sample information
wo
* STEP 3: Set up decision rule.
— The decision rule is a statement that tells. under
what circumstances to reject the null hypothesis.
The decision rule is based on specific values of the
test statistic.
40
© Scanned with OKEN Scanner* Rejection Region for Upper-Tailed Test
(H,: uU> Uy ) Ay CH 46)
The decision rule is: Reject H, if Test statistic
value > Critical value
" Rejection
ait, Becepta Region
sf Region ;
{1-4 a
a h Jes Agia Prramiln le
(: . SOR ke al
wa gl IP? WE 46 7
D—Feased tual Crd Lotter Hertel feel llr Hy eUL
© Scanned with OKEN Scanner* Rejection Region for Lower -Tailed Test
(Hy! H< Ho )
The decision rule is: Reject H, if Test statistic
value < - Critical value ae,
at Ted Sonate = alee
Rejection
Region
Qa
Acceptance
© Scanned with OKEN Scanner* Rejection Region for Two -Tailed Test
(Hy: L# Up )
The decision rule is: Reject Hp if Test statistic
value < - Critical value or Test statistic tic value >
Critical value i.e; Reject Hy if |statistic value] >
wae VHS —Crvetue
Critical value a GeeBads = Ci vatce
Rejection
Region
Rejection
Region
2
a
2
43
© Scanned with OKEN Scanner