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
Degrees of freedom (statistics) wikipedia , lookup
Sufficient statistic wikipedia , lookup
Foundations of statistics wikipedia , lookup
Bootstrapping (statistics) wikipedia , lookup
Taylor's law wikipedia , lookup
Statistical hypothesis testing wikipedia , lookup
Misuse of statistics wikipedia , lookup
Chapter 9 Testing Hypotheses Course Review 1. Levels of Measurement (nominal, ordinal, interval/ratio) 2. Measures of central tendency (mean, median, mode) 3. Measures of variability (range, variance, standard deviation) 4. Normal Distribution (normal curve) 5. Sampling (random, sampling distribution) 6. Estimation of population (confidence intervals, confidence levels) • • • • • Overview 5 Steps St f for ttesting ti h hypotheses th One and two-tailed tests Type 1 and Type 2 Errors Z tests and t tests 7. Testing hypotheses (z test, t test) Chapter 13 – 1 Chapter 13 – 2 Research Hypothesis (and Null Hypothesis) Testing Hypotheses (and Null Hypotheses) A research hypothesis is a statement reflecting a substantive hypothesis (i.e., the stated relationship between two population parameters). Testing Hypotheses is a procedure that allows us to evaluate hypotheses about population p p parameters p based on sample p statistics. A null hypothesis is a statement of “no difference” that is in opposition to the research hypothesis (for example: The GPA of Sociology majors is no different than that of the UNT student population.) Example of an hypothesis: Sociology majors at UNT have a higher GPA than the UNT student population. Chapter 13 – 3 One-Tailed Tests Chapter 13 – 4 It is one tailed since we are predicting that the income of Native Americans falls to the right of the income of the U.S. population. One-tailed hypothesis test – A hypothesis test in which the population parameter is likely to fall above or below another. Is this research hypothesis a one-tailed or two-tailed test: The family income of Native Americans is less than that of the U.S. population. Native Am. U.S. population What would be the null hypothesis? Chapter 13 – 5 Chapter 13 – 6 Two-Tailed Tests One-Tailed Tests • Right-tailed test – A one-tailed test in which the sample outcome is hypothesized to be at the right tail of the sampling distribution. (e.g., Gas prices i are hi higher h in i CA than th the th U.S.) US) • Left-tailed test – A one-tailed test in which the sample outcome is hypothesized to be at the left tail of the sampling distribution. (e.g., Gas prices are lower in TX than the U.S.) • Two-tailed hypothesis test – A hypothesis test in which a parameter statistic might fall within either tail of the sampling distribution. W are not sure which We hi h tail il of f the h curve the h statistic is likely to fall. For example: Gas prices in Michigan are not the same as that of the U.S. (we haven’t specified greater or lesser than)— what would be the null hypothesis of this example?) Chapter 13 – 7 The Five Steps In Hypothesis Testing 1. Make sure the data meet the assumptions for hypothesis testing --a random sample is being used --either the variable is normally distributed or the sample is over 50 cases, this will allow us to apply the Central Limit Theorem --knowing the level of measurement of the data, in the examples that we will be using, we will be assuming the dependent variable is interval/ratio. Chapter 13 – 8 The Five Steps In Hypotheses Testing 2. State the research and null hypotheses and selecting alpha. What is a research hypothesis (H1) – A statement reflecting the substantive hypothesis. For example, we might state: The average salary of Native Americans is less than that of the U.S. population. Chapter 13 – 9 The Five Steps In Hypotheses Testing The Five Steps In Hypotheses Testing 2. Chapter 13 – 10 Stating the research and null hypotheses and selecting alpha. Alpha is the probability level at which the null hypothesis is rejected. That is, it is the probability level at which we are willing to conclude that the null hypothesis is false. What is a null hypothesis (Ho) – Alphas are usually set at .05, .01, or .001. – A statement of “no difference,” which contradicts the research hypothesis. An Example of Alpha: It is the level at which we conclude that the average income for Native Americans is so different from the general population that we can safely say that the two incomes are different (if our sample doesn’t reach the “alpha level” we have set, then our null hypothesis is not rejected). For example, we might state: The average salary of Native Americans is no different than that of the U.S. population. Chapter 13 – 11 Chapter 13 – 12 The Five Steps In Hypotheses Testing The Five Steps In Hypotheses Testing For example: We want to test the null hypothesis that there is no difference in family income between Native Americans and the general U.S. population. If indeed there is no difference, then if we took 100 samples p of Native Americans,, we would expect p to find that the 100 sample means tend to fall around the U.S. population mean. Of course we only have a single sample. But, we can calculate where that single sample would fall within the normal distribution, when making the assumption that it is no different from the population mean (null hypothesis). The question becomes: What is the probability of obtaining a sample mean that is this different from the population mean, assuming there is really no difference between the two groups? If we find the probability to be extremely small, that is, if we find that there is very little chance that we would draw a sample that is this different from the population if the sample and population are really not different, then we will reject the null hypothesis and accept the research hypothesis that the two groups are different with regard to family income. Chapter 13 – 13 The Five Steps In Hypotheses Testing Chapter 13 – 14 The Five Steps In Hypotheses Testing So, in other words, our question is: 3. Selecting the sampling distribution and specifying the test statistic. Does the mean for family income we have obtained from our sample of Native Americans cast doubt on the null hypothesis of no difference between Native Americans and the general population with regard to income? Or: What are the chances that we would have randomly selected a sample of Native Americans with the income we found if there is no difference between Native Americans and the U.S. population. Our sampling distribution will be either the Z distribution or t distribution. That is, we will use either the Z or t distribution table to assist us in testing our hypothesis. To examine just how different our sample statistic is from the population parameter (e.g., how different our sample mean is from the population mean), our test statistic will be either the Z statistic or the t statistic. Chapter 13 – 15 Chapter 13 – 16 The Five Steps In Hypotheses Testing The Five Steps In Hypotheses Testing 4. Computing the test statistic, e.g., converting the sample mean to a Z statistic or t statistic. Let’s use an example to compute the test statistic: If we assume that our sample mean family income for Native Americans is $22,400 and that our mean family income for the U.S. population is $28,985, then we would ask: What are the chances that we would have randomly selected a sample of Native Americans such that their average family income is lower than $28,985 (the average family income for the U.S. population). Chapter 13 – 17 $22,400 $28,985 We can determine the chances or probability because of what we know about the sampling distribution. Chapter 13 – 18 The Five Steps In Hypotheses Testing So, lets suppose: The mean family income for our sample of Native Americans = $22,400 with a sample size of 100 The mean family income for U.S. population = $28,985 The standard deviation for U.S. population = $7,345 $22,400 $28,985 We can take our sample mean, convert it into a Z score, and find the Z score in the Z table. The number we find in the Z table will indicate the probability (known as a “p value”) of having a sample mean that is this different from the U.S. population mean. We want to test the null hypothesis that Native American income is no different than the U.S. population income. Chapter 13 – 19 Z= Y – uy oy Group Mean – Population Mean or Population SD N Oy Z = 22,400 – 28,985 734.5 = 4,585.0 734.5 Y – uy oy or Group Mean – Population Mean Population SD = N Z = 22,400 – 28,985 734.5 = $7,345/10 = $734.5 N Z= N N Standard Error = Chapter 13 – 20 -8.97 = 4,585.0 734.5 -8.97 To determine the probability of observing a Z value of -8.97, we look up the value in Appendix B to find the area beyond a Z of -8.97 (Column C). Chapter 13 – 21 Z = -8.97 8 97 = 0 Chapter 13 – 22 Z = -8.97 8 97 0 Our calculated Z value is not listed in Appendix B, so we will need to rely on the Last Z value reported in the table, 4.0. The “P value” for 4.0 (that is, the area beyond the Z) is .0001. Our calculated Z value is not listed in Appendix B, so we will need to rely on the Last Z value reported in the table, 4.0. The “P value” for 4.0 (that is, the area beyond the Z) is .0001. This value is the probability of getting the sample mean we got for Native Americans if the null hypothesis is true. Because it is so unlikely, we will reject the null hypothesis. This value is the probability of getting the sample mean we got for Native Americans if the null hypothesis is true. Because it is so unlikely, we will reject the null hypothesis. Chapter 13 – 23 Chapter 13 – 24 The Five Steps In Hypotheses Testing We can then conclude that our “Z statistic” (-8.97) is statistically significant, that is, it is very unlikely that the difference we found occurred by chance or sampling error. 5. Making a decision and interpreting the results Thus, if our p value is less than the alpha level we selected (e.g., .05 or .01, 01 or .001), 001) then we can reject the null hypothesis. We can say that the difference between the family income of Native Americans and the U.S. population is significant at the .0001 level. Since the alpha is typically set at .05 in the social sciences and our P value is much smaller than .05, we can reject our null hypothesis. Chapter 13 – 25 Errors that we try to avoid Type I error: if the null hypothesis is true but we reject it. Type II error: if the null hypothesis is false but we accept it. it Chapter 13 – 26 Type I and Type II Errors and their relationship to alpha • When selecting our alpha, we need to be aware that if we set alpha too large (e.g. .10)) we may y create a Type yp I error—that is, we might reject the null hypothesis when it is actually true. • Or, if we set the alpha too small (e.g., .001) we may create a Type II error by failing to reject a false null hypothesis. Chapter 13 – 27 Chapter 13 – 28 Let’s take another example: --We will test the null hypothesis that the salary for women is no different than that for the U.S. population as a whole. yp is that the salary y --Our research hypothesis for women is less than that for the U.S. population --The test statistic used is either the Z statistic or t statistic and since we have the population standard deviation we will use the Z statistic. --We sample at least 50 women so that our theoretical sampling distribution will be normally distributed (a required assumption). Chapter 13 – 29 Chapter 13 – 30 Computing the test statistic. The formula for the Z statistic is: 4. Computing the test statistic. The formula for the Z statistic is: Y – uy Z = oy N Group Mean – Population Mean or Z= Y – uy oy 24,100 – 28,985 or 100 N Population SD = -2.09 23,335 , Where the population mean is $28,985 N the sample mean for women is $24,100 the population standard deviation of 23,335 and the sample size is 100 Chapter 13 – 31 Chapter 13 – 32 Making a Decision and Interpreting the results, in our example: Probability Values --we confirm that the Z is on the left tail of the distribution (-2.09) --the P value found in the Z table (where Z = 2.09) is .0183, which is less than a .05 alpha. --thus, we can reject the null hypothesis of no difference and can conclude that the average income for women is less than that of the general population. 24,100 Women 28,985 U.S. Population Chapter 13 – 33 When to use the t statistic and when to use the Z statistic 1. The Z statistic can only be used if the population standard deviation is known. Typically, this is not the case. 2 2. When the sample standard deviation must be used in lieu of the population SD then the t statistic should be used. 3. Chapter 13 – 34 The Five Steps In Hypotheses Testing 4. Computing the test statistic. The formula for the t statistic is: Z= Y – uy Sy N The formula for the t statistic is identical to the formula for the Z statistic except that the sample SD is used in place of the population SD Chapter 13 – 35 G Group Mean M – Population P l Mean M or Sample SD N Chapter 13 – 36 t distribution Steps for interpreting the t statistic 1. The t statistic has its own t distribution table (Appendix C in text) that is used rather than the Z distribution table (Appendix B). This is because the Z distribution uses the population SD while the t distribution uses the sample SD. Using the sample SD results in some degree of error that is accounted for, in part, by the different shaped curves. Chapter 13 – 37 Steps for interpreting the t statistic 2. Reading the t distribution table requires knowing the degrees of freedom (a concept used in calculating a number of statistics including the t statistic). --Reading the t distribution table also requires knowing the alpha (which you select) and the number of cases. A smaller degree of freedom produces a flatter curve. When there is a large sample of 120+ cases, then the shape of the t distribution mirrors that of the Z distribution. Chapter 13 – 38 Steps for interpreting the t statistic 3. The degrees of freedom represent the number of scores that are free to vary in calculating each statistic (this is a statistical concept that is too advanced for this class). 4 4. Typically the degrees of freedom are N – 1 when comparing a group to a whole population and so, in some sense, it is simply reflecting the size of the sample. 5. Once we have selected our alpha and know the number of cases and subsequently the degrees of freedom, we can interpret the t statistic. Chapter 13 – 39 Chapter 13 – 40 6. calculating the t statistic For Example: • In our previous example we knew that: The population mean is $28,985 and the sample mean for women is $24,100 with a population standard deviation of 23,335 and sample size of 100. 100 The population mean is $28,985 and the sample mean for women is $24,100 with a sample standard deviation of 24,897 and sample l size i of f 100 100. • We subsequently calculated the Z score. • If we did not know the population SD, we would need to use the sample SD (which is $24,897) to calculate the SE and, in turn, to calculate the “t” score (or t statistic). Chapter 13 – 41 24,100-28,985 24,897 = -4885 2489.7 = -1.96 100 Chapter 13 – 42 t distribution table 7. Finding the t statistic in the t distribution table • Our degrees of freedom for this example is N – 1 or 99 and our t statistic is -1.96 (the larger the t statistic the more likely it will be significant). • On page 520 520-21 21 of your book we can find the t distribution table. It displays the degrees of freedom for 60 and for 120 (or see next slide). Since ours is 99 it falls between these. • We can assume a one-tailed test since existing knowledge indicates that women make less than the population as a whole and certainly not more (the mean will fall on the left side of the curve). Chapter 13 – 43 Determining Statistical Significance From the t distribution table we can conclude that our sample mean is statistically significant from the general population mean because: 1. On page 520 of your book we can see that, for 60 degrees of freedom, a t statistic stat st c of 1.671 .67 has a p value of .05 when using a one-tailed test. This is large enough to be statistically significant at alpha .05. 2. the degrees of freedom in our analysis is 99, therefore if our t statistic is 1.671 or larger we can conclude that our sample mean is statistically significant with a confidence level of 95%. Chapter 13 – 44 3.Since our actual t statistic is -1.96 we can conclude statistical significance at the .05 level. 4.We have assumed a one-tailed test since existing knowledge indicates that women make less than the population as a whole and certainly not more. If we did not know whether women make more or less than men we would need to use a two tailed test. Chapter 13 – 45 Chapter 13 – 46 t test in Sum Summary: Steps in Testing an Hypothesis • t statistic – The test statistic computed to test the null hypothesis about a population mean when the population standard deviation is unknown and is estimated using the sample standard deviation. 1. • t distribution d str ut on – A family fam ly of cur curves, es, each determined by its degrees of freedom (df). It is used when the population standard deviation is unknown and the standard error is estimated from the sample standard deviation. 3. Select sampling distribution and test statistic to be used (Z or t statistic) • Degrees of freedom (df) – The number of scores that are free to vary in calculating a statistic (typically N – 1). Chapter 13 – 47 Verify/make assumptions 2. State research and null hypotheses 4. Compute test statistic 5. Make a decision and interpret results Chapter 13 – 48 Comparing Two Sample Means (Rather than a Sample and a Population as just learned) Comparing Two Sample Means (Rather than a Sample and a Population as just learned) Example for comparing two means: – Comparing the mean salary for Native American men to the mean salary for White men (instead of the mean salary of Native American men to the mean salary of the whole U.S. population) Steps for comparing two sample means are the same as we have h learned l d for f comparing a sample mean to the population except for: Chapter 13 – 49 Chapter 13 – 50 except for: (1) the formula for calculating the t statistic, Calculating the t statistic: (2) calculating the degrees of freedom (since each group has its on number of cases we have to account for this) and this), Mean of 1st Group - Mean of 2nd Group Standard Error of the Differences Between the Means (3) determining whether the two groups have equal or unequal variances. If the Levene’s test is significant then their variances are unequal (one is at least twice as large as the other). Chapter 13 – 51 Calculation of the t Statistic is done by computer (so you won’t be responsible for calculating it by hand) Mean of 1st Group - (N 1) S1 (N-1) S1y11 - (N2-1) (N2 1) S2y2 S2 2 (N1 + N2) – 2 Example: Comparing Two Sample Means (male and female job burnout) In SPSS: Mean of 2nd Group 1. Analyze Standard Error of the Differences Between the Means SE = Chapter 13 – 52 2. compare means 3. independent sample t test N1+N2 N1 N2 N1N2 Where: 1st N1 = Number of cases for group N2 = Number of cases for 2nd group (N1 + N2) -2 = Degrees of freedom S1y1 = Sample variance for 1st group S2y2 = Sample variance for 2nd group move V V101 (s (sex)) to “group group variable” ar a box o 4.. mo 5. click “define group” 6. in group 1 put “1” (female) and in group 2 put “2” (male) 7. click continue Chapter 13 – 53 8. move “burnout”, V102 (age), V100 (education), V114 (# residents assigned) to “test variables” box and then click Okay Chapter 13 – 54