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
Hypothesis Testing: The z test How does the crime rate in San Diego compare with the crime rate in the United States? -‐ More crime? -‐ Less crime? First…Don’t forget about the sampling distribution of the mean ▪ If there IS NOT a significant difference in crime, then the distribution of sample means will be centered about the national average ▪ Common vs. rare outcomes Distribution of Sample Means Our hypothesized value Our obtained value Seriously…the sampling distribution of the mean is your best friend ▪ If there IS a significant difference in crime, then the sample mean of San Diego would be so different from the national average that it would be quite unusual to obtain such a value ▪ The population represented by our sample (San Diego) differs significantly from the comparison population (the whole US) Distribution of Sample Means Our obtained value Our hypothesized value The Process of Hypothesis Testing ▪ Define your question (We already did this) ▪ Example: Is there more or less crime in San Diego compared to the USA overall? ▪ Identify hypotheses ▪ Null and Alternative ▪ Specify decision rule ▪ One-‐ and two-‐tailed tests ▪ Calculate observed z-‐value ▪ Z scores + sample mean distributions ▪ Make a decision and interpret The Process of Hypothesis Testing ▪ Define your question (We already did this) ▪ Example: Is there more or less crime in San Diego compared to the USA overall? ▪ Identify hypotheses ▪ Null and Alternative ▪ Specify decision rule ▪ One-‐ and two-‐tailed tests ▪ Calculate observed z-‐value ▪ Z scores + sample mean distributions ▪ Make a decision and interpret Identify hypotheses ▪ Null hypothesis: there is no effect; nothing special is happening with respect to some characteristic of the underlying population ▪ H0: X SD = μUSA ▪ H0: SD crime = USA crime ▪ Crime in San Diego is the same as the crime in the overall USA ▪ Alternative hypothesis: there is an effect; the group you are studying differs with respect to some characteristic of the underlying population ▪ H1: X SD ≠ μUSA ▪ H1: SD crime ≠ USA crime ▪ Crime in San Diego is different than crime in the overall USA Practice! Formulate Null and Alternative Hypotheses 1. A statistics professor wishes to determine whether her class’s test scores differ from all stats classes at ucsd, which average of 72% 2. A psychologist wishes to determine whether her clients have more or less depression than the national average of depression 3. A political scientist wants to see if there more libertarians in Berkeley, California, compared to Naperville, Illinois The Process of Hypothesis Testing ▪ Define your question (We already did this) ▪ Example: Is there more or less crime in San Diego compared to the USA overall? ▪ Identify hypotheses ▪ Null and Alternative ▪ Specify decision rule ▪ One-‐ and two-‐tailed tests ▪ Calculate observed z-‐value ▪ Z scores + sample mean distributions ▪ Make a decision and interpret Specify Decision Rule (i.e., when do we reject the null hypothesis?) ▪ (def) precisely when the null hypothesis should be rejected ▪ Critical values (z-‐scores) ▪ A z-‐score that separates common from rare outcomes to determine whether the null hypothesis should be rejected ▪ ± 1.96 Alpha ▪ Level of significance (α) ▪ Degree of rarity required of an observed outcome in order to reject the null hypothesis. ▪ α = 05 Practice the decision rule! Should the null hypothesis be retained (i.e., failed to reject) or rejected based on the following observed z-‐scores? A. B. C. D. E. F. G. H. I. J. 1.95 3.00 -‐3.00 1.97 .15 -‐.36 2.01 -‐2.6 -‐1.4 0 The Process of Hypothesis Testing ▪ Define your question (We already did this) ▪ Example: Is there more or less crime in San Diego compared to the USA overall? ▪ Identify hypotheses ▪ Null and Alternative ▪ Specify decision rule ▪ One-‐ and two-‐tailed tests ▪ Calculate observed z-‐value ▪ Z scores + sample mean distributions ▪ Make a decision and interpret Calculate the observed z-‐value ▪ In chapter 5 we were finding the z-‐score of a single individual on a distribution of a population of individuals ▪ In hypothesis testing, you are finding a z-‐score of your sample’s mean on a distribution of means sample mean - population mean Z= standard error of the mean Z= X −µ σ X Remember, this is just the standard deviation σX of the sampling distribution of the mean = σ n Using our example: Crime in San Diego vs. USA ▪ Our obtained sample mean of crime in San Diego is a score of 90, our sample size was 100 ▪ The national average is 85, standard deviation of 20 Z= X −µ σ X 90 − 85 5 Z= = = 2.5 20 2 100 ▪ Our sample mean is 2.5 standard errors of the mean greater than expected if the null hypothesis were true ▪ 2.5 falls in the rejection region, so we reject H0and retain H1 Z score of 2.5 falls outside the rejection region! Practice! ▪ Calculate the value of the z-‐test for each of the following, determine whether you should reject or accept the null hypothesis 1. SAT scores at ucsd vs. all college students: Sample mean = 566, population standard deviation = 30, sample size = 36, population mean = 560 2. Average age of marriage in US vs. the world: Sample mean = 24, population standard deviation = 4, sample size = 64, population mean = 25 3. Weight of vegetarians vs. all people in USA Sample mean = 136, population standard deviation = 15, sample size = 25, population mean = 146 The Process of Hypothesis Testing ▪ Define your question (We already did this) ▪ Example: Is there more or less crime in San Diego compared to the USA overall? ▪ Identify hypotheses ▪ Null and Alternative ▪ Specify decision rule ▪ One-‐ and two-‐tailed tests ▪ Calculate observed z-‐value ▪ Z scores + sample mean distributions ▪ Make a decision and interpret Make a decision and interpret ▪ Did you reject or accept the null? ▪ Rejected ▪ Put it into understandable language in the terms of your original research question: ▪ The crime level in San Diego probably differs from the national average ▪ More specifically, the crime level in San Diego is higher than the national average Practice! ▪ 169 statistics students were surveyed and the average homework time was 25 minutes. The mean homework time of all psychology students was 22.5 minutes of homework with a standard deviation of 13 minutes. Do statistics students differ from all psychology students? Assume a .05 level of significance. 1. What is the null hypothesis? 2. What is the alternative hypothesis? 3. What is the decision rule? 4. What is the value of z? 5. What is your decision? 6. What is your interpretation?