Examples Using Statistical Software Applications

Printer-friendly versionPrinter-friendly version

For the following examples use either of the following datasets: Course_Survey.MTW or Course_Survey.XLS

About the data set: Last spring, all students registered for STAT200 were asked to complete a survey. A total of 1004 students responded. If we assume that this sample represents the PSU-UP undergraduate population, then we can make inferences regarding this population based on the survey results.

Question 1: Would you date someone with a great personality even if you did not find them attractive?

Hypotheses Statements: What would be the correct hypothesis to determine if there is a difference in gender between the true percentages that would date someone with a great personality even if they did not find them attractive among PSU-UP undergraduate students?

Ho : p1p2 = 0 and Ha : p1p2 ≠ 0

To perform a two proportion hypothesis test in Minitab:

  1. Open Minitab data set
  2. Go to Stat > Basic Stat > 2- proportions
  3. Click the radio button for Samples in One Column (this is the default)
  4. Click the text box for Samples (cursor should be in this box)
  5. Select from the variables list the variable DatePerly (be sure the variable DatePerly appears in the text box)
  6. Enter Gender in the text box for Subscripts
  7. Click Options and select the correct Alternative (e.g. not equal to); enter the correct Test Proportion value (default is 0.0 which is correct for this example); if using Version 15 in Minitab check the box for Used Pooled Estimate of p - remember this is only available in Version 15 or higher and is used when the test proportion is 0.
  8. Click OK twice

This should result in the following output:

Minitab output for two proportions hypothesis test includes sample p, difference between two proportions, 95% confidence interval of the difference, and z-value and p-value for the test. Here, the z-value is 9.45 and the p-value is 0.000.

watch!

To perform a two proportion hypothesis test in Minitab Express:

  1. Open the Course_Survey.MTW data set.
  2. From the menu bar, select Statistics > Two Samples > Proportions.
  3. Double-click on the variable DatePerly to insert it into the "Samples" box.
  4. Double-click on the variable Gender to insert it into the "Sample IDs" box.
  5. Click on the options tab and verify that the alternative hypothesis is "Difference ≠ 0" and the confidence level is 95.
  6. Change the test method to "Use the pooled estimate of the proportion".
  7. Click OK.

This should result in the following output:

minitab express output for a 2 proportion hypothesis test

watch!

Conclusion and Decision: Since the p-value is less than 0.05 we would reject the null hypothesis and conclude that there is statistical evidence that a difference exists between the true proportion of female students who would date someone with a great personality if not attracted to them and the true proportion of males who would do so.

Confidence Interval interpretation: We are 95% confident that the true difference in gender between the percentages that would date someone with a great personality even if they did not find them attractive among PSU-UP undergraduate students undergraduate students is between 24.1% inches and 36.0%.

About the output:

  • Difference is given as p(female) − p(male) indicating that the difference is calculated by taking Female minus Male. If you wanted the reverse, then in Minitab you would have to recode the Gender variable to 0 and 1 where the 1 would represent Female.
  • The value of 0.300931 found in the Estimate for Difference would be the sample statistic used to build the confidence interval. That is, we would take this value and then add and subtract from it the margin of error.
  • Since the confidence interval results in an interval that contains all positive values and we took Female minus Male, we would conclude Female PSU−UP undergraduates are more likely than their male counterparts to date someone with a great personality even if they did not find them attractive.
  • The Event = Yes indicates that the Yes response was the "success" of interest. If No was of concern, then we would have to recode these responses to 0 and 1 where 1 would represent No.
  • The Z−value of 9.45 is the test statistic one would use to find the p−value. This test statistic is found by taking the sample statistic (i.e. the estimate difference) minus the hypothesize value of 0 (see that Test of Difference equals 0) and dividing by the standard error.

Question 2: What are the measurements of the span of your right and left hand?

Hypotheses Statements: What would be the correct hypothesis to determine if mean right hand spans differ than mean left hand spans among PSU-UP undergraduate students?

H0 : μd = 0   and   Ha : μd ≠ 0

To perform a matched pairs hypothesis test in Minitab:

  1. Open Minitab data set.
  2. Go to Stat > Basic Stat > Paired-t.
  3. Click the radio button for Samples in Column (this is the default).
  4. Click the text box for First Sample (cursor should be in this box).
  5. Select from the variables list the variable Rspan (be sure the variable Rspan appears in the text box) and then in Second Sample enter the variable Lspan.
  6. Click Options and select the correct Alternative (e.g. not equal to); enter the correct Test Mean value (default is 0.0 which is correct for this example.
  7. Click OK twice.

This should result in the following output:

Minitab output for paired t test, includes mean, standard deviation, standard error of mean for each group and difference, and t-value and p-value for the test. Here, the t-value is 1.83 and p-value is 0.068.

watch!

To perform a matched pairs hypothesis test in Minitab Express:

  1. Open the Course_Survey.MTW data set.
  2. From the menu bar, select Statistics > Two Samples > Paired t.
  3. Double-click the variable Rspan to insert it into the "Sample 1" box.
  4. Double-click the variable Lspan to insert it into the "Sample 2" box.
  5. Click the option tab, and verify that your alternative hypothesis is "Mean difference ≠ 0", and that your confidence level is 95.
  6. Click OK.

This should result in the following output:

minitab express output for a matched pair hypothesis test

watch!

Conclusion and Decision: Since the p-value of 0.068 is greater than 0.05 we would not reject the null hypothesis. We do not have enough statistical evidence to say that, on average, the true mean length of right hand spans differs from the true mean length of left hand spans for PSU−UP undergrads.

NOTE: This was a two-sided test since we used "not equal" in the alternative hypothesis (also see that minitab says "not = 0"). If the research interest was to show that on average right-hand spans were longer than left-hand spans then our new Ha would use > and we need to divide this p-value by 2. In then next example we show how to use minitab to conduct such one-sided hypothesis tests.

Confidence Interval interpretation: We are 95% confident that the true mean difference between right hand spans and left hand spans for PSU−UP undergraduate students is between −0.0035 inches and 0.0998 inches.

About the output:

  • Based on the text Paired T for Rspan − Lspan the difference is found by taking the right hand spans minus the left hand spans.
  • The value of the Mean found in the row named Difference would be the sample statistic used to build the confidence interval. That is, we would take this value and then add and subtract from it the margin of error.
  • the value in the Difference row under SE Mean is the Standard Error of the Mean and is calculated by taking the Standard Deviation found in that Difference row (0.798840) and dividing by the square root of the number of differences.
  • Since the confidence interval results in an interval that contains zero, we would conclude that no difference exists between the means. This result should concur with our hypothesis result as long as the alpha value used for the test corresponds to the level of confidence (i.e. alpha of 0.05 corresponds to a 95% level of confidence; alpha of 0.10 would correspond to a 90% level of confidence).
  • The T-value of 1.83 is the test statistic one would use to find the p-value. This test statistic is found by taking the sample statistic (i.e. the estimate difference) − the hypothesize value of 0 (see that Test of Difference equals 0) and dividing by the standard error (SE Mean of 0.026308).

Question 3: Some students who belong to Greek organizations (e.g. fraternities and sororities) believe that they do not drink anymore or less than non-Greek-organization students. However, the university administration does not agree, and wants to show that on average, the population of Greek students drink more more frequently during any given month than their non-greek counterparts. What would be the correct hypothesis to determine if the administration is correct? Assume that non-greeks are population μ1 and greeks are μ2.

H0 : μ1 - μ2 = 0   and   Ha : μ1 - μ2 < 0

To perform a two sample mean hypothesis test in Minitab:

  1. Open Minitab data set.
  2. Go to Stat > Basic Stat > 2-Sample t.
  3. Click the radio button for Samples in One Column (this is the default).
  4. Click the text box for Samples (cursor should be in this box).
  5. Select from the variables list the variable DaysAlco (be sure the variable DaysAlco appears in the text box).
  6. Enter Greek in the text box for Subscripts.
  7. Click check box for Assume Equal Variances (we can verify this with the output).
  8. Click Options and select the correct Alternative (less than for this example); enter the correct Test Difference value (default is 0.0 which is correct for this example).
  9. Click OK twice.

This should result in the following output:

Minitab output for two-sample t test with pooled variance, includes mean, standard deviation, standard error of mean for each group, and t-value and p-value for the test. Here, the t-value is negative 8.61 and the p-value is 0.000. The last line in the output is pooled variance, 5.3574.

watch!

To perform a two sample mean hypothesis test in Minitab Express:

  1. Open the Course_Survey.MTW data set.
  2. From the menu bar, select Statistics > Two Samples > t.
  3. Double-click on the variable DaysAlco to insert it into the "Samples" box.
  4. Double-click on the variable Greek? to insert it into the "Sample IDs" box.
  5. Click the options tab, and change the alternative hypothesis to "Difference < 0".
  6. Verify that the confidence level is 95, and check the box to assume equal variances.
  7. Click OK.

This should result in the following output:

minitab express output for a 2 sample hypothesis test

watch!

Conclusion and Decision: Since the p-value is approximately 0.000 (we do not actually state that the p-value is 0) and is less than 0.05 we would reject the null hypothesis and conclude that there is statistical evidence that on average, the greek population drinks more days per month than the non-greeks at PSU-UP.

Confidence Interval interpretation: We are 95% confident that for PSU−UP the true mean difference between the number of days per month non−Greek−organization students drink compared to their Greek counterparts is more than 3 days.

About the output:

  • Difference is given as μ(No) − μ(Yes) indicating that the difference is calculated by taking No minus Yes for those responding to whether there belonged to a Greek organization.
  • The value of −3.712 found in the Estimate for Difference would be the sample statistic used to build the confidence interval. That is, we would take this value and then only add the margin of error. We only add since we are conducting a one−sided test of hypothesis and this side is for less than. The 95% upper bound provides the upper limit to our confidence interval and combining our alternative hypothesis implies that our estimated true mean difference is no greater (i.e. the true mean difference is 3.003 days or more. If this seems confusing consider if you reversed the order subtracting non−Greeks from Greeks. The results would be the same except the bound would be positive and would represent the lower bound. The interpretation then might seem more clear).
  • the value in the Difference row under SE Mean is the Standard Error of the Mean and is calculated by taking the Standard Deviation found in that Difference row (0.798840) and dividing by the square root of the number of differences.
  • The T−value of −8.61 is the test statistic one would use to find the p-value. This test statistic is found by taking the sample statistic (i.e. the estimate difference) − the hypothesized value of 0 (see that Test of Difference equals 0) and dividing by the standard error.
  • The Both use Pooled StDev = 5.3574 indicates that the pooled variance assumption was used which makes sense since the ratio between the two standard deviations, 5.52 and 4.48, is not greater than two.