false

Class Notes
(834,986)

Canada
(508,846)

University of Toronto Scarborough
(31,432)

Statistics
(280)

STAB22H3
(222)

Ken Butler
(34)

Lecture

Unlock Document

Statistics

STAB22H3

Ken Butler

Fall

Description

LEC19
CHAPTER 20: TESTING HYPOTHESES ABOUT
PROPORTIONS
(COVERS 20,21)
QUESTION: "A newsletter reported tha 90% of adults drink milk. However, a survey
from a certain region found that 652 of 750 (86.93%) randomly selected adults drink
milk. Is this evidence that the 90% figure is NOT accurate for this region?"
ADDRESSING THIS QUESTION
- diff. of 86.93% from survey vs. 90% from newsletter may be due to chance
- ex. could have got signif. # of non-milk drinkers which caused % to go down
ONE APPROACH: CONFIDENCE INTERVAL
- find the standard error:
=
= 0.012308127 ~ 0.0123
- now, calculate confidence interval:
a) 95%
95% CI:
(0.8693) ± (1.96)(0.0123) =
(0.845192, 0.893408)
- we are 95% confident that the true prop. of milk drinkers is between about 84.5% to
89%
b) 99%
(0.8693) ± (1.645)(0.0123) =
(0.838, 0.901)
- we are 99% confident that the true prop. of milk drinkers is between about 84% and
90%
- based on confidence interval results, it is most likely that % of milk drinkers is below
90%
- do we believe this 90% figure or not? CI is one way to determine if its plausible What is another way to test the plausibility of this 90% figure?
- hypothesis test
[234]
BETTER: HYPOTHESIS TESTING; THINK ABOUT LOGIC [OF HYPOTHESIS
TESTING] FIRST BY ANALOGY
This:
is analogous to:
Court of law analogy
- H0 (null hypothesis): accused is innocent
- HA (alternative hypothesis): accused is guilty
- b/c we do not know for sure whether innocent/guilty, have to go thro. process in
court to decide the individual's status.
- analogous to having to go thro. statistical calculations to see if null model holds
or not
- if person is found not guilty, this does not mean they definitely did NOT do it, but they
may have done it after all but it could not have been proven - analgous to failing to reject the H0, when in fact it was incorrect (2. TYPE II
error: H0 is false, but is failed to be rejected)
=> diff. b/ween they didn't do it vs. u could not prove they did it
- if person innocent and not guilty, then right decision made
- analagous to making the correct decision of failing to reject H0
- always chance of making error
- one error is to say that person is actually innocent, but found guilty (serious
error;
- analogous to this type of error: 1. TYPE I: H0 is true, but is mistakingly
rejected)
- in this legal sys, person is presumed innocent until proven guilty
- analagous to assuming H0 is true, until it is proven that we should reject it.
[240]
HYPOTHESIS TESTING
- H0 (Null hypothesis)
- analagous to "presumption of innocence"
- HA (Alternative hypothesis)
- states that H0 is false
- but to reject H0 in favour of HA, we req. sufficient evidence (data)
- in hypo. testing, you ask: "what do I need evidence for"? What evidence is
needed for is HA (EX) MILK EXAMPLE
Recall: "A newsletter reported tha 90% of adults drink milk. However, a survey from a
certain region found that 652 of 750 (86.93%) randomly selected adults drink milk.
Is this evidence that the 90% figure is NOT accurate for this region?"
ADDRESSING THE QUESTION WITH HYPOTHESIS TESTING
- H0, HA
- statements made, don't know if true/not
- make them and see if true or not
- H0: p = 0.90
- statement that ppl who drink is 90%
- going to believe that newsletter about milk until we know better
- HA: p ≠ 0.90
- do not say what p is, but say it is NOT 0.90
- saying H0 is wrong
=> trying to prove that 90% is not correct for this region
=> hypo. is either true or false
alternative hypothesis
=- what are we trying to prove
- what are we trying to gather evidence in favour of)
- prop. of ppl drinking milk is sth OTHER than 0.90
- have to give evidence to backup what is meant by evidence?
- data
[241]
HOW TO ASSESS WHETHER WE BELIEVE H0?
1. ASSESS EVIDENCE
- EVIDENCE = DATA
- specifically, the SAMPLE PROPORTION p
P-value
= probab. of being as far/further from H0 than the value observed
(Milk example)
- H0: p = 0.90
- p = 652/750 = 0.8693
- null model is given by Normal model distribution
- ex. mean = 0.90 (p), SD =?
- SD = \sqrt{(0.90)(0.10)/750} = 0.0110
- the 'p' we are using the hypothesized value of the H0
- p = 0.90 - this is NOT the true prop. of the popn
- now, use SD and mean to get test statistic (z)
z = (0.8693 - 0.9) / (0.0110) = -2.79
This corresponds to P(z ≤ -2.79) = 0.0026 below
- 0.0026*2 = P-value = 0.0052, b/c we could have observed p to be above 90%
as well
- so this P-value is telling us that the probability of observing a proportion of about 87%
being milk drinkers, given that null model is true, is about 0.52%
Implication
- what is done is that we use info from sample (n = 750, p = 0.90, p = 0.87) to see if
we believe H0, or not
P-value is evidence against H0
- b/c it is so small for this ex, it is saying that it is highly unlikely to have
observed the val we got for p given that H0 is true
- calculation showing that if 0.9 is correct, then observing 0.8693, even though
its only 3% pts below, is pretty unlikely - so P is v.small => strong evidence against null, so h0 is false beyond reasonable
doubt
=> it is very unlikely that, if the null model is true, we would get a proportion of about
87% being milk drinkers. We do not believe that this was a fluke, after all, we gathered
a lot of evidence to come to this percentage. So, instead of believing that, we reject H0
in favour of HA.
[242]
"BEYOND A REASONABLE DOUBT"
(Milk example)
- P-value = 0.0052
- is this "beyond a reasonable doubt"?
- P-value that we got says that value of p we got from data is v.unlikely if H0: p = 0.90
is true
- So either:
a) we observed sth v.unlikely (it was a fluke)
b) H0: p = 0.90 is not true at all
- When P-value is signifiantly small (like in this case), we prefer to believe b)
=> we reject H0 in favour of HA: p ≠ 0.90
Suppose we got P-value = 0.7789
- saying that there is about a 78% likelihood of getting data we got, given that null
model is true
- this P-value is not small at all - says that if H0 were true, then what is observed is entirely consistent w/ that
- it could have been observed given H0 is true, so no reason to doubt it
NOTE:
- when have large P val, have NOT proved that H0 is true, b/c that is what we
started w/ having assumed
- instead we say we could not prove that it wasn't false
- opp. of reject is acept
- not accepting H0, b/c don't believe it is true
- rather we could not prove that it was wrong though
- If
- P is small, then reject H0 in favour of HA
- P is large, then fail to reject H0
- this does NOT prove that H0 true, rather all it declares is that we cannot
reject H0.
[243]
ONE-SIDED AND TWO-SIDED TESTS
[!] On final, if we are asked to do problems with these tests, we will only be
doing two-sided tests. However, the professor still wants us to understand
why one-sided test might be useful.
(Milk example)
- HA: p ≠ 0.90 - this is a two-sided test b/c val's ofar above or far below 0.90 can make us
reject H0
- suppose we got p = 0.92
- we compute z-score for this, using p = 0.90, SD = 0.0110, and we get 1.82
- this z-score corresponds to prop. of 0.9656 less
- but, we need the prop of the two tails of normal model:
- for purpose of this course, were focusing on 2-SIDED TESTS
One-sided tests
(Milk example)
- we might be looking for evidence that p is SMALLER than 0.90
- ie.
- H0: p = 0.90
- HA: p < 0.90
HOW TO GET P-value?
1. check if p we retrieve is within the interval of the HA - ex. p = 0.92 is NOT less than 0.90, so immediately we fail to reject H0
- ex. p = 0.8693 IS less than 0.90, so we proceed
2.
- calculate z-score for p (ex. using p = 0.8693)
- P-value is probab. less
- for p = 0.8693, z = -2.79, and we get P = 0.0026
- DO NOT MULTIPLY BY 2
NOTE ABOUT ONE-SIDED TEST
(can skip 1-sided test portion)
- just recog. when one-sided might be useful, but WILL NOT BE ASKED TO
ACTUALLY DO IT
[245]
ONE-SIDED TEST (EX2)
- H0: p = 0.90
- HA: p > 0.90
HOW TO GET P-value?
1. check if p we retrieve is within the interval of the HA
- ex. p = 0.8693 is NOT greater than 0.90, so immediately we fail to reject H0
- ex. p = 0.92 IS greater than 0.90, so we proceed
2.
- calculate z-score for p (ex. using p = 0.92) - P-value is probab. greater
- for p = 0.92, z = 1.82, P = 1 - 0.9656 = 0.0344
(remember: we want the tail ends of the normal distribution)
- DO NOT MULTIPLY BY 2
[246]
WHEN DOING A HYPOTHESIS TEST
1. ALWAYS STATE P-value
- allows reader to draw their own conclusion about truthfulness or falsity of H0
2. FOLLOW UP REJECTION OF H0 WITH CONFIDENCE INTERVAL
- allows reader to get idea of size of parameter (effect size)
=> get an idea of whether result is important vs. merely statistically sig

More
Less
Related notes for STAB22H3

Join OneClass

Access over 10 million pages of study

documents for 1.3 million courses.

Sign up

Join to view

Continue

Continue
OR

By registering, I agree to the
Terms
and
Privacy Policies

Already have an account?
Log in

Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.