Wk10workedexample.pdf

Worked Example for Week 10

Using the same data from our previous Worked Examples, along with new data, I will show you

how you can test the difference between means using some basic descriptive statistics of the two

samples being compared. As a result, you will see an example of hypothesis testing: a statistical

test that examines the possible significant difference between two groups. The process can be

done for proportions as well, but for our purposes we will focus on means.

To perform this test we will require descriptive statistics for two groups. The first group will be

the sample of prisoners we have used in all of our Worked Examples. The second group will be a

new hypothetical group from a different prison. Let’s assume the first group is male prisoners

and the second group is female prisoners. Thus, we are testing to see if there is a significant

difference in the mean number of months incarcerated for males and females.

Our null hypothesis is always written that the two means are equal. To reject this, we need to

find a significant difference. Similar to “innocent until proven guilty”, we assume equal means

until proven different. The null hypothesis can be written as follows:

H0: μ1 = μ2 or 1 = 2

Our alternative hypothesis is written that the two means are not equal (significantly different).

H1: μ1 ≠ μ2 or 1 ≠ 2

Notice the subscript numbers next to the symbols for means: this is simply referring to each

group. Each symbol with a “1” subscript requires the descriptive data from Group 1 and each

symbol with a “2” subscript requires the descriptive data from Group 2. It does not necessarily

matter which group you refer to as “1” and “2”; what is important is that you are consistent

throughout the hypothesis test processes*. If you mix the groups throughout the steps, you will

end up with incorrect and invalid results. Now that we have stated our hypothesis, we must list

the descriptive statistics needed for the hypothesis test.

Group 1, as we stated, is the male prisoners. Since we have used this data throughout our

Worked Examples, we already have all the information needed.

N1 = 10 1 = 4 s12= 3.4

Recall N is our sample size. is the mean. S2 is the variance. This is very important; the standarddeviation is not required in this test, we need to use the variance (standard deviation “squared”).

Group 2, as we stated, is the female prisoners. For our purposes, I will simply supply the

descriptive statistics needed for the hypothesis test.

N2 = 12 2 = 2 s22= 2

Now that we have the required information we can begin to test the hypothesis that the mean

number of months incarcerated is equal between male and female prisoners. From our two small

samples we see that males have an average of 4 months and females have an average of 2

months. Remember, these are very small samples so we must use that information in

combination with the variability to determine if we have enough information to conclude the

difference is significant.

Step 1: Compute the standard error.

This step is tedious and requires a lot of information.

S 1- 2= √(

) (

) S 1- 2= √(

) (

)

S 1- 2 = .73

Step 2: Compute the test statistic (t-value). We simply subtract the mean of group 2 from the

mean of group 1 and divide by the standard error, the value we just calculated.

T=

T=

T= 2.74

Step 3: Determine the critical value. This step requires knowledge of what alpha level you will

be using and a T-distribution table of values. As is common in criminal justice research we will

look at alpha levels of .05 and .01.

The critical value for our hypothesis test with an alpha level of .05 is 2.086

The critical value for our hypothesis test with an alpha level of .01 is 2.845

Step 4: Compare test statistic (t-value) and critical value. Interpret.

We computed a test statistic of 2.74 which is larger than the first critical value of 2.086; we reject

the null hypothesis that the mean number of months incarcerated is equal between males and

females. We are stating that based on the information provided to us we can say at the .05 alpha

level (or with 95% confidence) the means are different.

When examining the test statistic of 2.74 at the .01 alpha level we fail to reject the null

hypothesis that the mean number of months incarcerated is equal between males and females.

This is due to the test statistic being lower than the critical value of 2.845. We are stating that

based on the information provided to us we can’t say at the .01 alpha level the means are

N1

N1 N1

N1

different. Essentially, we can be 95% confident that the observed difference is true or not due to

sampling error/chance but we cannot be 99% confident.

*As a note, depending on the values of the means and the order in which you subtract one from

the other you may end up with a negative test statistic (t-value). That is fine. When this happens

simply compare the numerical value itself to the critical value just as you would if the value was

positive. The negative only implies directionality, a component we are not focusing on. The interpretation of actual difference is what is important.

Steps to test the null hypothesis that the mean number of months incarcerated for

males is equal to the mean number of months incarcerated for females:

Find the standard error of the difference between means using:

S 1- 2= √(

) (

N )

Compute the test statistic (t-value) by dividing the difference between means by

the standard error of the difference between means using:

T=

Determine the critical value (based on alpha level and degrees of freedom).

df=(N1+N2-2)

Compare our T -value and our critical value. Interpret. (If t-value exceeds critical;

reject the null hypothesis)