Deriving the expected value equation in chi-squared tests.

26 Views Asked by At

I'm struggling to get my head around a statistics idea (I study medicine). In calculating chi squared, the expected value is first calculated by using the following equation: $\frac{\text{row total}\times \text{column total}}{\text{total}}$

This does not make logical sense to me, I will demonstrate with an example. enter image description here

This compares treatment with a drug (dexamethasone) vs placebo in a simple 2x2 table.

Ho = dexa has equal effect on death as placebo and H1 = dexa reduces death. We want to calculate no. people who died on dexa (482 cell).

Logically in my head, I would find the probability of death when on the placebo ($1110/4321$) and then multiply that probability by 2104 since its the total patients on dexa = 504. However this is not the case, the actual answer is $\frac{(2104*1592)}{6425}$.

Any help explaining the logic behind this equation would be much appreciated. Thanks.