Class Notes (836,580)
Canada (509,856)
Statistics (287)
STAB22H3 (229)
Ken Butler (34)
Lecture

STAB22-LEC22-(23,24).docx

23 Pages
113 Views
Unlock Document

Department
Statistics
Course
STAB22H3
Professor
Ken Butler
Semester
Fall

Description
LEC22 - STAB22 CHAPTER 23: INFERENCES ABOUT MEANS (COVERS 23,24) [282] (This slide is a repeat of [275]) INQUIRY: What if popn distrib. not Normal, but instead, signif. skewed? - then use median instead of mean to do hypo. testing and making CIs [283] What if df NOT on the table? (ex) - t = 1.87 - df = 34 - if you look in Table T, there is NO 34 df - round down to next lower val (ie. 32 df) - 2-sided value is then b/ween 0.05 and 0.10 - b/c our val is 1.87, but that exact val is not on the table, but it is in b/ween the two listed table val's, 1.694 and 2.037 in 32 df row. - see p1049. - were using 95% CI => b/c we set alpha = 0.05, fail to reject H0. [283] SIGN TEST - suppose we suspect data is skewed - then, instead of using mean for hypo testing, use median (Ex) - H0: median = 50 - HA: median not = 50 - if H0 true, then each sample val equally likely to be above/below 50 - n = 10 - now it is about prop's - 50% chance below median (q) - 50% chance above median (p) - b/c there are only two probabilities, and we have sample size, and we are looking at #successes in specified #trials (10), use Binom(10, 0.5) => amt that are ABOVE 50 is binomial with n = 10, p = 0.5 - so what we need to do is use the binomial table and find the probab. of getting this #sample val's, or greater being above median. (see example in subsequent slide) Note about Sign test - no Normality assumption wrt data - still have to follow all other assumptions & conditions - 10% condition - Success/Failure condition - Randomization condition - Independence assumption Note about above/below val's - if we have sample of 10 val's, and we have 4 below and 6 above, even THAT is consistent with H0 - but if it is 8 val's above, 2 below, then likely to reject H0 Other notes about Sign test - doesn't take into account how far above median the sample val is - P of being above OR P of being below is same: 0.5 - if H0 true, then can model with Binomial distrib => Binom(n, 0.5) [285] EXAMPLE (SIGN TEST) YOGURT DATA: 160, 130, 200, 170, 220, 190, 230, 80, 120, 120, 80, 100, 140, 170 - Test: >- H0: median = 120 >- HA: median > 120 (one-sided) - alpha = 0.05 - looking at data, and count if above or below, but discard those that're exactly equal to median. 160, 130, 200, 170, 220, 190, 230, 80, 120, 120, 80, 100, 140, 170 a) 9 val's > 120 b) 3 val's < 120 c) 2 val's = 120 (discard) - so then, we have these sample val's remaining: 160, 130, 200, 170, 220, 190, 230, 80, 80, 100, 140, 170 => we now are using n = 12 instead of n = 14 - binomial with - n = 12 - p = 0.5 - X = #sample val's > median (=120) ---- (NOTE: his calculation is wrong b/c he did not count up the # of val's that're above, below 120 correctly) - ex. he said 10 above 120, when really, it is 9 ---- - continuing, we use Binomial table to get this probab: - P(9 or greater [that're bigger than median]) - P(9 or greater) = P(X=9) + P(X=10) + P(X=11) + P(X=12) = 0.0729 - P-value is not 2x this probab - b/c we are using ONE-TAILED test => P-value = P(9 or greater) = 0.0729 > 0.05 - This is saying; how likely am I to get as far away from middle, or further from 9 val's greater than median, given that H0 is true. - Conclusion: fail to reject H0; not enough evidence to conclude that diet guide is incorrect - this is NOT same conclusion we retrieve doing t-test. Sign test - H0: median = 120 - HA: median > 120 (ie. it is greater than this) What is P-value telling us? - how likely are we to get 9/more successes (success being sample val above median) in 12 coin flip-like trials (called b/c p = 0.5 for sucesss (An. getting heads), q = 0.5 for failure (An. getting tails)) [286] SIGN TEST vs. t-TEST AND ANOTHER WAY OF GETTING P-value Sign test - does not get same P-value as t-test - no assumption of normality for what popn looks like, and therefore, what data we end up with - use t-test instead if data is normal, b/c sign test is not as powerful in that situation - t-test typically gets P-value smaller than sign test - if data was really normal, then t-test is better test, and therefore should use it - b/c it is based on that assumption (ex from last slide) - n =12, p = 0.5, observed X=9) - Can also use normal approximation to binomial model (another way of getting P-value using sign test) - #val's above 120 has mean E(X) = 12(0.5) = 6 - SD(X) = \sqrt{(12)(0.5)(0.5)} = 1.73 = - so E(X) = 6, SD(X) = 1.73 - so use z-score on value 10 (y-bar) = 10 - we are assuming we have approximation to normal model, so paramters of normal model are sigma (SD(X) = 1.73), mu (E(X) = 6) - then, z = (10-6)/(1.73) = 2.31 - P(2.31 less) = 0.9896 - get P(2.31 above) = 1 - 0.9896 = 0.0104 = P-value (we are not multiplying by 2 b/c we used one-tailed test, not two-tailed) - going this route, we find that we reject H0 and conclude that diet guide is wrong. Note! - we cannot really use normal approximation here b/c Success/Failure condition fails (ex) - (n)(p) ≥ 10 - (12)(0.5) = 6 < 10 - but he uses anyways, just to show us how this method works [287] POWER OF t-test and sign test Recall: what is power? POWER = test's ability to detect false H0 (CHP 21) (ie. test's ability to reject H0, when it should) (Yogurt ex.) - how likely to reject: H0: median = 120 (or H0: mean = 120 if using t-test) in favour of one-sided alternative, if distribution of yogurt calories per serving actually is normal with mean 150, SD 50, and n = 20 samples? - so he did a simulation on StatCrunch - got 20 samples from a Normal popn with mu = 120, sigma = 50 - calculated P-value, SD, t-statistic for each val. - then, counted #val's over 120 in each sample, and see if reject or fail to reject H0. - then, count #rejections (Recall: we SHOULD be rejecting this b/c popn mean we KNOW is 150, while H0 claims that popn mean is 120) - how likely to reject H0 when it is wrong, and does that change whether do t-test vs. sign test (this is what simulation is checking) - he did one for sign, another for t-test [288] - histogram of P-values from t-test - alpha = 0.05 - can see that about 739 were definitely less than alpha = 0.05, but in TOTAL, about 981 less than the 0.05 mark. - power SHOULD be about 98.1% then... [289] RESULTS FOR SIGN TEST - he said: - about 560/1000 (56%) cases in which we reject H0, when we should - I say: - about 849/1000 cases (84.9%) in which we reject H0, when we should - Why? b/c that is how trials in which we got P-value roughly below 0.05 mark (count the two small boxes directly after the tallest one, and you can see that they are less than alpha = P-value of 0.05 as well) => power is around 84.9% Simulation data from t-test (portion of it): Simulation data from sign test (portion of it): [290] COMPARISON OF POWER - still using prev example - we KNOW H0 is wrong (b/c we KNOW mu = 150, but H0 claims that mu = 120) - so, aim is to reject most of the time - high power => low P(type II error) - Results: (he says the results are): TEST ESTIMATED POWER t-test 0.74 sign test 0.56 (but I say the results are): TEST ESTIMATED POWER t-test 0.981 sign test 0.849 - b/c H0 is really wrong, power should be as big as possible - nevertheless, t-test has greater power than sign test, when popn is actually normal => t-test is bet
More Less

Related notes for STAB22H3

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
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.

Add your courses

Get notes from the top students in your class.


Submit