# Test statistic help

#### toronto416

##### New Member
Hey guys, I'm having a tough time figuring out how to get the test statistic value from the table I was provided with.

1.) In a test of a new product for a form of cancer the following table resulted. The categories were “cancer free for five years yes-no” and “new treatment yes-no”.

Cancer free\ NT Yes No Total
Yes 60 90 150
No 40 10 50
Total 100 100 200

I'm not sure if the table is goin to stay formatted so it is easily readable, so I attached a .jpg image of the table.

All I'm looking to calculate here is the test statistic, I found the critical value as 3.84, because the degree of freedom is 1 at the 5% level.

Please, any help would be appreciated!

#### Dragan

##### Super Moderator
Hey guys, I'm having a tough time figuring out how to get the test statistic value from the table I was provided with.

1.) In a test of a new product for a form of cancer the following table resulted. The categories were “cancer free for five years yes-no” and “new treatment yes-no”.

Cancer free\ NT Yes No Total
Yes 60 90 150
No 40 10 50
Total 100 100 200

I'm not sure if the table is goin to stay formatted so it is easily readable, so I attached a .jpg image of the table.

All I'm looking to calculate here is the test statistic, I found the critical value as 3.84, because the degree of freedom is 1 at the 5% level.

Please, any help would be appreciated!
The statistic you want to compute is a Pearson Chi-Square test (X^2) of independence on 1df where the critical value is 3.84 as you state.

X^2 = Sum [ (O-E)^2 / E ]

where O's are you observations in your (4) cells. The E's are the expected frequencies assuming two variables are independent.

You determine the E's cells by multiplying the cell's associated Row and Column totals and then dividing this product by the total sample size. For example, E11 is 150*100 / 200 = 75. Do this for the other 3 cells.

Thus,

X^2 = (60 - 75)^2 / 75 + (90 - 75)^2 / 75 +
(40 - 25)^2 / 25 + (10 - 25)^2 / 25 = 24.00.

Hence, Reject the null hypothesis that the two variables are independent because X^2=24.00>3.84.