Class Notes (808,147)
Canada (493,093)
Statistics (266)
STAB22H3 (208)
Ken Butler (34)


23 Pages
Unlock Document

University of Toronto Scarborough
Ken Butler

STAB22, LEC21 CHAPTER 22: MORE ABOUT TESTS (COVERS 22,23) [268] WHAT A HYPOTHESIS TEST IS - feed into box: a) data - sample prop. b) hypotheses - hypo. prop. - SD(p-hat) - it splits out P-VALUE. - using: - test statistic (z) - Normal table - use this to draw conclusions, remembering to state in context as well Remember! - decide on what alpha is BEFORE running hypo test (ex) if we had set alpha = 0.05, and we got P=0.03, then we reject H0 in favour of HA. [269] PUT DOWN ALL THESE FORMULAE ONTO CHEATSHEET - Up to this point we have done the first two rows 1- Proportion 2- Comparing proportions - recall: - H0: no diff in 2 prop's - HA: diff in 2 prop's - Now to wrap up the course, we are going to finish off the latter three rows: - Mean - Comparing means (2 samples) - Matched pairs - Procedure is same, but details are diff. (when it comes to hypo testing, CIs, power, etc.) - if testing for prop, then H0 will say that p = sth, and that is val to use - when doing CI, don't have val. of p to use, so that why u use one from SAMPLE (p-hat) - if we had the true prop already, we would not even need to make a CI! - Notice that for the means, we need t-distribution and t*, while for prop's, we need normal distribution and z*. - Idea of test statistic is same: [270] CHAPTER 23: INFERENCES ABOUT MEANS - use means to make inferences involving quantitative var's (qvar's) - ex. #calories in serving of yogurt - for prop's, it is categorical var's (cvar's) - ex. cause of homocide death - categories: shooting, poison, stabbing etc. CLT's statement - if a) you sample from popn with mean mu, SD sigma, b) sample size n is large - then, sampling distribution of y-bar (sample means) approximately - NORMAL - has mean mu - has SD note: doesn't matter what shape of popn was Problems satisfying CLT - sample size may not be sufficiently large - popn SD almost certainly unknown [271] INVESTIGATION BY SIMULATION - Butler set up a simulation on StatCrunch with following characteristics - popn normal - mean 30 - sigma 5 - n = 2 - sigma was NOT used though - sample SD's used instead Simulated data - took 1000 samples (n=2) - mean, SD, z was calculated for each sample - used mean, SD of sample instead of popn parameters - calculated P-value for each z's sample - for each P-value, it was recorded whether it was... - P-value < alpha - reject=true - P-value > alpha - reject=false .. where alpha = 0.05 Problem 1: n too small - obvious conseq: SD's are vary considerably, some not even close to sigma (=5) - ex. SD = 10.468317 (sample 4) - ex. SD = 0.9438873 (sample 11) Concern #2: - z-value, P-values vary considerably - ex. z = 10.361 (sample 10) - vs. z = -0.250 (sample 14) - ex. P-value = 0.0103 (sample 18) - vs. P-value = 1.284 (sample 11) Problem #2: - - making too many type I errors - rejected way too many times (283 times, 28.3%) - ie. see so many trues in the reject col. - we should have prop. of false rejections be around 0.05 - remember: alpha = probability that we make type I error [272] Returning to the pie chart - using sample SD to get z-statistic is wrong when it comes to testing with means [273] PROBLEM(s)! HOW TO FIX THESE UP? Issue - sample SD's we are getting aren't, in general, coming close to, let alone being the same, as popn SD (sigma) - might be v.far off when n is small - another key problem (mentioned in text) is that null model for means does NOT generally follow a normal distribution - it looks the normal curve by its bell-shapedness, but its tail ends are fatter - aka t-distribution - aka Student's t distribution Solution (by Gosset) - calculate test statistic (t) using sample SD - then, get P-value from table of t-distribution (TABLE T at the back of textbook) with n-1 degrees of freedom Example: test: - H0: mu = 30 - HA: mu ≠ 30 (2-sided) - n = 10 - y-bar = 35 - s = 5 then, = (35-30)/(5/\sqrt{10}) = 3.16 - Look up in T-table for the 'df' row 9 (b/c df = 10 - 1 = 9) - recall: our 't' = 3.16 - b/ween the cells 2.821 and 3.250 on T-table - thus, P-value is b/ween 0.01 and 0.02 - remember: we are using 2-sided (aka two-tailed) - Butler wanted to be more precise with this P-value, so he got the exact P-value from StatCrunch - 2(0.0058) = 0.0116 - but because our alpha = 0.05, it does not matter where in between 0.01 and 0.02 our P-value lies - reject null anyways, b/c P-value < alpha => conclusion in context: popn mean NOT 30. Process of testing using 't' distribution 1. get 't' statistic 2. get 'df' (df = n-1) 3. find P-value corresponding to this df, 't' statistic 4. make conclusion about hypo, and in context. [274] - %type I errors we are likely to make when using t-distribution instead of normal distribution when getting P-values for means is MUCH more closer to 5% (SATISFACTORY) - we are comparing this to the other pie chrat, which shows us using normal distirbution - remember: we used df = 1, n = 2. - compare above pie chart to: - making about 4% type I is better than making about 28.4% using z-val's and normal model! [275] WHEN WILL t-TEST WORK? - t-distribution theory based on normal popn - if calc. t-statistic and do entire process to get P-value, then will be exactly right given that popn is normal large samples small samples - CLT works, regardless of what is actual - CLT does not work shape of popn distrib. - possible that sample SD is v.far off from - sample SD ~ popn SD popn SD => does not matter much if we do not - beware of outliers/skewedness know what sigma is - large typically
More Less

Related notes for STAB22H3

Log In


Don't have an account?

Join OneClass

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

Sign up

Join to view


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.