Registered data

Smoking

Parents smoke

Parents don't

Child smoke

Child don't

Sum

Sum

Expected

Smoking

Parents smoke

Parents don't

Child smoke

Child don't

Sum

Sum

Child smoke

Smoking

Parents smoke

Parents don't

Sum

Child don't

Sum

Chi 2 value:

if independent

Chi 2 værdi:

Probability:

Blue columns are registered data.
Brown columns are expected if independence.


Both smoke     Only parents     Only child        None
                             smoke                smoke  

From measured data 
use spreadsheet to perform
Chi-square test.

Degrees of freedom

Try with:

Try with:

Registered data:

Assume independence

C5 = 35
C6 = 23
D5 = 33
D6 = 46
E5: C5 + D5
E6: C6 + D6
C7: C5 + C6
D7: D5 + D6
E7: E5 + E6
C11: (C7 / E7 * E5)
C12: (C7 / E7 * E6)
D11: (D7 / E7 * E5)
D12: (D7 / E7 * E6)
E11: C11 + D11
E12: C12 + D12
C13: C11 + C12
D13: D11 + D12
Chi: E11 + E12
E13: E11 + E12
C17: (C5 - C11)^(2) / C11
C18: (C6 - C12)^(2) / C12
D17: (D5 - D11)^(2) / D11
D18: (D6 - D12)^(2) / D12
E17: C17 + D17
E18: C18 + D18
C19: C17 + C18
D19: D17 + D18
E19: C19 + D19
E21: E19
a = BarChart({2, 4, 6, 8}, C5:D6, 1)
b = BarChart({2, 4, 6, 8}, C11:D12, 0.7)
C27 = 29
C28 = 29
D27 = 39
D28 = 40
C30 = 42
C31 = 16
D30 = 26
D31 = 43
C24 = 35
C25 = 23
D24 = 33
D25 = 46
E22: 100 - (ChiSquared[1, E19] * 100)