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
Making Decisions about a Single Population Mean ( ) Example 1: Time it takes to fall asleep Data File: Sleep-time.JMP Background: These data come from a study comparing the time it takes for smokers and non-smokers to fall asleep. Variables: Sleep-time.JMP > Smoking Status - smoker or non-smoker > Sleep Time - time to fall asleep Question of Interest: Is the average sleep-time for everyone in the population longer than 20 minutes? Putting this question into statements that will be used for hypothesis testing: H o : Mean Sleep Time for everyone in the population is 20 minutes or less H a : Mean Sleep Time for everyone in the population is greater than 20 minutes Intuitive Decision In order to determine whether or not the null or alternative hypothesis is true, you should first review the summary statistics for the variable you are interested in testing. Remember, these summary statistics are for the observations you observe. In the end, we are trying to make decisions about everyone in the greater population, not just the observations you observe. In order to make decisions about all observations of interest, we must apply some inferential technique (i.e. hypothesis tests or confidence intervals) Recall, to get summary statistics for a numerical variable, select Analyze > Distribution. The variable to summarize is Sleep Time. Assumptions 1. The observations should follow a normal distribution. To check this assumption, we can place a normal curve over our histogram (right click on the Sleep Time header > Fit Distribution > Normal). Another plot that is commonly used to assess normality is the Normal Quantile Plot. To obtain a Normal Quantile Plot in JMP, you can either right click on the Sleep Time header and select Normal Quantile Plot from the menu that pops-up or select that option from the pull-down menu to the left of the variable name. Using these graphs, do you think normality is being satisfied? Explain. While the distribution does appear to be symmetric it is quite kurtotic. This is evidenced by the S-shape in the normal quantile plot and the near uniform appearance of the histogram. Our sample size is large (n = 84), so in spite of the fact the distribution is kurtotic we will proceed with t-test and CI. Performing the actual hypothesis test Recall, the hypothesis of interest HO: Average Sleep Time for everyone in the population is 20 minutes or less Ha: Average Sleep Time for everyone in the population is greater than 20 minutes For convenience, let Average for everyone in the population. Also, a subscript may be used to identify what variable is being tested. As a result, the following is a more traditional way of writing our hypotheses for the question of interest. H o : sleeptime 20 min . H a : sleeptime 20 min . To perform the test, right click on the Sleep Time header and select the Test Mean. Enter the value (or boundary value) from for the mean from the null hypothesis in the box labeled Specify Hypothesized Mean. Also check the box for Wilcoxon Sign-Rank test and click OK. The results of the test are shown next. Number 6 Description The hypothesized mean assuming the null hypothesis is true, 20 minutes in this case. The estimated sample mean, X 20.49 minutes in this case. The degrees of freedom for the t-statistic, df = n – 1 = 84 – 1 = 83. The sample standard deviation, s = 3.05. The test statistic X o 20.49 20 t 1.46 s 3.05 n 84 p-value for two-tailed test ( H a : 20 ) 7 p-value for upper-tail test ( H a : 20 ) 8 p-value for lower-tail test ( H a : 20 ) 1 2 3 4 5 So what about our test... What type of test do we have? Upper-tailed t-test What is the appropriate p-value? p-value = .0739, we have weak evidence against the null hypothesis. What is our decision for the test? We have weak evidence against the null hypothesis in support of the alternative. Using a level of significance we fail to reject. Write a conclusion for your findings. There is insufficient evidence to indicate the mean time it takes adults to fall asleep is greater than 20 minutes. From the Moments box, we see that the likely range for the mean Sleep Time of everyone in the population (i.e. Sleeptime ) is 19.82 minutes up to 21.15 minutes. That is, a 95% confidence interval for Sleeptime is (19.82, 21.15). Interpret the meaning of this interval. Does this agree with what you found in above using the hypothesis test? Explain. We estimate that the mean time it takes adults to fall asleep is between 19.82 and 21.15 minutes. There is a 95% chance this interval will cover the true mean time it takes to fall asleep. An Nonparametric Alternative If we believe that the distribution of Sleep Time is not normal, but is symmetric, then a nonparametric test may be appropriate. To obtain a nonparametric test we check the box labeled Wilcoxon Signed-Rank Test in the Test Mean window. The results of this test are shown below. The p-value for signed-rank test suggests that the typical (mean or median) Sleep Time for the entire population is not greater than 20 minutes. This test agrees with what was discovered above in the test that assumes normality. The details of the Wilcoxon Signed-Rank test procedure will be covered in class. Example 2 - Normal Human Body Temperature Data File: Bodytemp.JMP Background: These data come from a study of the normal human body temperature. Mackowiak, P. A., Wasserman, S. S., and Levine, M. M. (1992), "A Critical Appraisal of 98.6 Degrees F, the Upper Limit of the Normal Body Temperature, and Other Legacies of Carl Reinhold August Wunderlich," Journal of the American Medical Association, 268, 1578-1580. Variables: Bodytemp.JMP > Gender – gender of subject > Temperature – body temperature in degrees Farenheit. > Heart Rate – heart rate of subject It has long been believed that the normal human body temperature is 98.6o F. The data for this example comes from a study of body temperature and pulse rate for adults. Suppose we wish to test: Ho : normal mean body temperature is 98.6o F) Ha : normal mean body temperature is NOT 98.6o F) Select Analyze > Distribution and put Temperature in the right hand box. To assess normality (required for using a t-test) we again use a normal curve, a smooth density estimate, and a normal quantile plot which can be obtained by selecting those options from the Temperature pull-down menu. The results are shown on the following page. Using these graphs, do you think normality is being satisfied? Explain. To perform the t-test select the Test Mean ... option from Temperature pull-down menu located next to the variable name at the top of the window. Next enter the value for the mean assuming the null hypothesis is true, 98.6 here, in the box labeled Specify Hypothesized Value for the Mean then click OK. The results of the t-test are shown below. There are three p-values reported for each test along with the value of the t-test statistic. The p-values are for a two-tailed ( H a : 98.6 o F ) , upper-tailed ( H a : 98.6 o F ) and lower tailed ( H a : 98.6 o F ) tests respectively. Here we are performing a two-tailed test so our p-value is < .0001. What is our decision for the test? Write a conclusion for your findings. In both the Moments and Fit Normal boxes above we see that the 95% CI for is given by the interval (98.122, 98.3765). Interpret the meaning of this interval. Does this agree with what you found in above using the hypothesis test? Explain. Inference for the Population Variance and Standard Deviation When fitting a normal distribution to our data we also obtain an estimate and CI for the population SD . We can also perform tests regarding the standard deviation by selecting the Test SD... option from the variable pull-down menu and entering a hypothesized value for the standard deviation in the box. Inference for the population variance and standard deviation are covered in your text: * Section 7.9 for testing and CI’s for 2 (pop. variance) and (pop. standard deviation)