ANALYZING THE RELATIONSHIP BETWEEN ONE CATEGORICAL AND ONE NUMERICAL VARIABLE

Open patient_data.sav in SPSS. Test the following hypotheses:

- Female patients have longer stays than male patients.
- Minority patients have shorter stays than white patients.
- Married persons have shorter stays than the never married, divorced, or widowed.
- Higher levels of bladder incontinence increases length of stay.

Print and save your output file. Write up the results of your analysis using the examples below as a guide. Be sure to (a) state the null hypothesis being tested, (b) identify and justify the statistical test(s) that are used, (c) present and discuss the values of all relevant statistics, (d) state your alpha level and indicate your decision regarding the null hypothesis, and (e) discuss the implications of your findings for the original hypothesis. Include tables to support your narratives. Turn in your write up and a printout of your output.

Example 1:

To determine whether males have higher GPAs than females, I tested the null hypothesis that there is no difference in GPA between males and females. An independent measures t-test was used because such a test is appropriate for determining if the mean of a numerical variable (GPA) is same for two groups defined by a dichotomous categorical variable (sex). Separate variances were assumed in the test since the sample size was relatively small (n=52), the two groups were unequal in size (35 males, 22 females) and the analysis of variance test indicated a significant difference in the variances of the groups (F=6.77, p=.0023). The mean GPA for males was 2.7 while the mean GPA of females was 2.3. The t-test yielded a t value of 1.2. The probability of getting a t value this large if the null hypothesis of no difference between the groups is true is .46. Given that this probability exceeds my alpha level of .05, I fail to reject the null hypothesis that there is no difference in GPA between men and women and find no support for the original hypothesis that sex affects GPA.

**Table 1. T-Test Comparing Mean GPA for
Males and Females**

Mean for Males | Mean For Females | Difference in Means | t |
---|

GPA |
2.7 |
2.3 |
0.4 |
1.2 |

Example 2:

To determine whether college class affects hours spent studying, I tested the null hypothesis that there is no difference in the number of hours spent studying by college class. An analysis of variance test was used because such a test is approrpriate for determining if the mean of a numerical variable (hours spent studying) is same for three or more groups defined by a categorical variable (college class). Equal variances were assumed in the test since the sample size was relatively large (n=1345) and the four groups were approximately equal in size (425 freshmen, 475 sophomores, 445 juniors, 400 seniors). Since analysis of variance only tells if one of the groups being analyzed differs from any of the others, a Scheffe multiple comparison test was also performed to determine which, if any, groups differed from each other.

On the average, freshmen studied 10.1 hours per week, sophomores studied 9.7 hours per week, juniors studied 11.8 hours per week, and seniors studied 12.3 hours per week. The analysis of variance test produced a F value of 131.2. The probability of getting a F value this large if the null hypothesis of no difference between the groups is true is .01. Given that this probability falls below my alpha level of .05, I reject the null hypothesis that there is no difference in the number of hours spent studying by college class. The Scheffe multiple comparison test indicates that juniors and seniors differ significantly (alpha=.05) from freshmen and sophomores in the number of hours spent studying. Based on these results, I find find support for the original hypothesis that college class affects hours spent studying.

**Table 2. Results of ANOVA Comparing
Mean Hours Spent Studying by College Class**

Number | Mean | Standard Deviation |
---|

Fresman | 425 | 10.1 | 3.2 |

Sophomore | 475 | 9.7 | 2.1 |

Junior | 445 | 11.8 | 1.9 |

Senior | 400 | 12.3 | 1.5 |

F = 131.2, p < .05. |