Testing a Hypothesis about means - PowerPoint PPT Presentation

testing a hypothesis about means n.
Skip this Video
Loading SlideShow in 5 Seconds..
Testing a Hypothesis about means PowerPoint Presentation
Download Presentation
Testing a Hypothesis about means

play fullscreen
1 / 39
Testing a Hypothesis about means
Download Presentation
Download Presentation

Testing a Hypothesis about means

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Testing a Hypothesis about means • The contents in this chapter are from Chapter 12 to Chapter 14 of the textbook. • Testing a single mean • Testing two related means • Testing two independent means

  2. Testing a single mean • This chapter uses the gssft.sav data, which includes data for fulltime workers only. • The variables are: • Hrsl: number of hours worked last week • Agecat: age category • Rincome: respondents income

  3. The left plot is a histogram of the number of hours worked in the previous week for 437 college graduates The peak at 40 hours is higher than you would expect for a normal distribution. There is also a tail toward larger values of hours worked. It appears that people are more likely to work a long week than a short week. Example

  4. The sample mean (47) is not equals to the sample median (45). The distribution is right-skewed that is consistent with Sk=1.24 The distribution is not normal. How would you go about determining if 47 is an unlikely value if the population mean to be 40. Example basic statistics

  5. Testing a single mean The variance is unknown, • The statistic • The rejection region • The critical value of t can be found in many textbooks or SPSS.

  6. Testing a single mean • The standard error of the mean is • The t -statistic The 95% confidence interval of the difference is

  7. The t-distribution • The statistic used in the previous page follows a t-distribution with n-1 degrees of freedom. • This is a 2-tailed test. • The p-value is the probability that a sample t value is greater than 14.3 or less than -14.3. • The p-value in this example is less than 0.0005. • We can conclude that it’s quite unlikely that college graduates work a 40-hour on average.

  8. The degree of freedoms in this test is 437-1=436. The t distribution is very close to the normal. The critical values or confidence interval can be determined based on the normal population. Normal approximation

  9. The 95% confidence interval is given by

  10. Hypothesis Testing • The p-value is the probability of getting a test statistic equal to or more extreme than the sample result, given that the null hypothesis is true.

  11. Testing a Hypothesis about Two related means • We use the endoph.sav data set provided by the author. • Dale et al. (1987) investigated the possible role of in the collapse of runners. are morphine (吗啡)-like substances manufactured in the body. • They measured plasma (血浆)concentrations for 11 runners before and after they participated in a half-marathon run. • The question of interest was whether average levels changed during a run.

  12. Testing a Hypothesis about Two related means

  13. Testing a Hypothesis about Two related means • This problem is recommended to use the paired-samples t test.

  14. Testing a Hypothesis about Two related means • The average difference is 18.74 that is large comparing with S.D.=8.3. • The 95% confidence interval for the average difference is (13.14, 24.33) that does not includes the value of o, you can reject the hypothesis. • An equivalent way or testing the hypothesis is the t test. The p-value is less than 0.0005, we should reject the hypothesis.

  15. Testing a Hypothesis about Two related means

  16. Testing a Hypothesis about Two related means diff Stem-and-Leaf Plot Frequency Stem & Leaf 1.00 0 . 3 4.00 1 . 0127 5.00 2 . 00458 1.00 3 . 0 Stem width: 10.00 Each leaf: 1 case (s) Each difference uses only the first two digits with rounding.

  17. Testing a Hypothesis about Two related means • All the differences are positive. That is, the after values are always greater than the before values. • The stem-and-leaf plot doesn’t suggest any obvious departures from normality. • A normal probability plot, or Q-Q plot, can helps us to test the normality of the data.

  18. Normal Probability Plot • For each data point, the Q-Q plot shows the observed value and the value that is expected if the data are a sample from a normal distribution. • The points should cluster around a straight line if the data are from a normal distribution. • The normal Q-Q plot of the difference variable is nor or less linear, so the assumption of normality appears to be reasonable.

  19. Normal Probability Plot

  20. This section uses the gss.sav data set. Consider the number of hours of television viewing per day reported by internet users and non-users. It is clear that both are not from a normal distribution. Testing Two Independent Means

  21. Testing Two Independent Means • We find that there are some problems in the data. • There are people who report watching television for 24 hours a day!! It is impossible. • Watch TV is not a very well-defined term. If you have the TV on while you are doing homework, are you studying or watching TV? • The observations in these two groups are independent. This fact implies “two independent means”.

  22. Testing Two Independent Means

  23. Testing Two Independent Means • Two sample means, 2.42 hours of TV viewing and 3.52 hours for those who don’t use the internet. A difference is about 1.1 hours. • The 5% trimmed means, which are calculated by removing the top and bottom 5% of the values, are 0.3 hours less for both groups than the arithmetic means. The trimmed means are more meaningful in this case study.

  24. Testing Two Independent Means • For testing the hypothesis • There are several cases:

  25. Testing Two Independent Means

  26. Testing Two Independent Means • In most cases the variances are unknown.

  27. Testing Two Independent Means • Output from t test for TV watching hours

  28. Testing Two Independent Means • In the output, there are two difference versions of the t test. • One makes the assumption that the variances in the two populations are equal; the other does not. • Both tests recommend to reject the hypothesis with a significant level less than 0.0005. • The two-tailed test used in the two tests. • Testing the equality of two variances will be given next section.

  29. Testing Two Independent Means • The 95% confidence interval for the true difference is • [0.77, 1.42] for equal variances not assumed, • [0.76, 1.42] for the equal variances assumed. • Both the intervals do not cover the value 0, we should reject the hypothesis.

  30. F test for equality of Two Variances

  31. F test for equality of Two Variances

  32. F test for equality of Two Variances

  33. F test for equality of Two Variances • From the results below we have • The critical value is close to 1.00 that implies to reject the hypothesis that two populations have the same variance.

  34. Levene’s test for equality of variances • The SPSS report used the Levene’s test (1960) that is used to test if k samples have equal variances. • Equal variances across samples is called homogeneity of variance. • The Lenene’s test is less sensitive than some other tests. • The SPSS output recommends to reject the hypothesis.

  35. Effect Outliers • Some one reported watching TV for very long time, including 24 hours a day. • Removed observations where the person watch TV for more than 12 hours.

  36. Effect Outliers • The average difference between the two groups reduced from 1.09 to 1.05. • The conclusions do not have any change.

  37. Introducing More Variables • Let us consider more related variables to study on the TV watching time • Consider age, education, working hours.

  38. Introducing More Variables • We reject the hypothesis that in the population the two groups have the same average age, education, and hours. • Internet users are significantly younger, better educated, and work more hours per week.

  39. Introducing More Variables