Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
5/21/15 Administration • • • • • Seating chart (name and email address) Coffee sign up (first name) New syllabus posted (one paper dropped) Exam will be open book and notes Questions? • Back to sampling methods…. 1 5/21/15 Sampling Methods • Goal: sample is representative of the population • Ideal: random sample – every possible sample equally likely to be drawn • Check: compare sample characteristics to known population parameters (if available) Examples (p. 30) • Are the samples random? – Letters from constituents • Goal: determine whether constituents favor bill • Sample: views expressed in letters – Survey of law students • Goal: measure importance of opportunity to travel to future choice of employment • Sample: survey of law students taking international trade • Powerful critiques include arguments about how the sample might be biased (results produced using sample can’t be used to draw conclusions about the population of interest) 2 5/21/15 Hypothesis Testing • Start with hypothesis derived from some claim or theory – The average LSAT score for all U.S. law students in 2007 was 151. • Specify null and alternative hypotheses – Null hypothesis: Average LSAT = 151 – Alternative hypothesis: • Two-sided test: Average LSAT ≠ 151 • One-sided test: Average LSAT > 151 (or average LSAT < 151) Hypothesis testing: how to do it 1. Formulate hypotheses 2. Draw sample 3. Calculate sample mean 4. Calculate (sample) standard deviation If sample size is sufficiently large, the sample mean will approximate the population mean. z-statistic (or t-statistic) P-value 3 5/21/15 Example of a Test Statistic • z statistic – z = (sample mean – hypothesized population mean) / (sample std dev / square root of the sample size) • Test statistics have known distributions! Central Limit Theorem • The sampling distribution for means of samples consisting of 30 values or more will be roughly normal!! • This is true no matter what the initial distribution looks like!!! • EXAMPLES…. 4 5/21/15 The Normal Distribution 68% of observations fall within 1 standard deviation of the mean (RED) 95% fall within 2 standard deviations from the mean (RED and GREEN) 99.7% fall within 3 standard deviations from the mean (ALL COLORS) P-value • The p-value is the probability of observing a test statistic at least as extreme as the observed test statistic (e.g., z or t) given that the null hypothesis is true. • We know the probability because we know the distribution of the test statistic (it’s normal!) 5 5/21/15 Interpretation of Results Reminder: The p-value is the probability of observing a test statistic at least as extreme as the observed test statistic (e.g., z or t) given that the null hypothesis is true (e.g., LSAT mean = 151) Example 1 Example 2 Sample mean = 155 t = 5.5 p = 0.002 Sample mean = 152 t = 1.1 p = 0.20 Therefore, reject null in favor of alternative Therefore, evidence insufficient to reject null Data do not support the guess (“prior”) Data support guess Relationship between p-values and test statistics Two-sided t-statistic p-value Reject null at the… | t | > 2.58 * p < 0.01 1% level (high level of confidence in rejection) 2.58 > | t | > 1.96 0.01 < p < 0.05 5% level (medium level of confidence in rejection) 1.96 > | t | > 1.65 0.05 < p < 0.10 10% level (low level of confidence in rejection) | t | < 1.65 p > 0.10 Cannot reject null * <----------------|--------------------|--------------------|--------------> - 2.58 0 2.58 (guess) 6 5/21/15 Type I and Type II Errors Null: Average population LSAT score is 151. Alternative: Average population LSAT score is not equal to 151. NULL HYPOTHESIS TRUE ACCEPT NULL Life is good REJECT NULL Type I error (“significance”) RESULT OF TEST FALSE Type II error (“power”) Life is good α Example: Test a coin for fairness 1. Identify a testable hypothesis 2. Toss the coin a number of times (gather data) 3. Analyze the results 4. Draw an inference about the fairness of the coin based on the sample 7 5/21/15 Example Null hypothesis: p(head) = 50% Alternative hypothesis: p(head) ≠ 50% Data: Of 1,000 tosses, 540 came up heads. Example z-value = 2.53 (test statistic) p-value = 0.01 If the null hypothesis is true (i.e., the coin is fair), the probability that we would observe a z-value this extreme or more extreme is only 1%!! Inference: At a 95% confidence level, we reject the null hypothesis in favor of the alternative (i.e., the data do not allow us to conclude that the coin is fair). 8