observed_average := 52.7: expected_average := 50.: SE := 25./sqrt(400.): z := (observed_average - expected_average)/SE; P := (100 - 96.84)/2; H0 := `Box contains an equal number of zeroes and ones`: H1 := `Box contains more ones than zeroes`: observed_proportion := 5167./10000: expected_proportion := 5000./10000.: SE := sqrt(0.5*0.5)/sqrt(10000.): z := (observed_proportion - expected_proportion)/SE; P := (100 - 99.19)/2; average := (50.8+50.9+50.7)/3.; SD := sqrt( ((50.8-average)^2+(50.9-average)^2+(50.7-average)^2)/3.); SDplus := SD*sqrt(3./2.); t := (average - 50)/(SDplus/sqrt(3.)); AVEa := 220 : SDa := 70 : AVEb := 180 : SDb := 50 : SEa := SDa/sqrt(100); SEb := SDb/sqrt(250); SEdifference := sqrt(SEa^2 + SEb^2); z := ( (AVEa - AVEb) - 0 ) / SEdifference: evalf(z,3); obsDiff := 21.9 - 11.0; SE85 := 100*sqrt(.219*(1.-.219))/sqrt(700.); SE92 := 100*sqrt(.11*(1.-.11))/sqrt(700.); SEdiff := sqrt(SE85^2+SE92^2); z := obsDiff/SEdiff; obsDiff := 36.0-31.9; SE85 := 100*sqrt(.36*(1.-.36))/sqrt(700.); SE92 := 100*sqrt(.319*(1.-.319))/sqrt(700.); SEdiff := sqrt(SE85^2+SE92^2); z := obsDiff/SEdiff; P := (100-89.04)/2.; H0 := `no difference between Wheaties and Sugar Pops`: H1 := `Wheaties are better`: observed_difference := 66 - 59: expected_difference := 0.0: SE_aveW := 21/sqrt(250.); SE_aveSP := 20/sqrt(249.); SE_difference := sqrt(1.33^2 + 1.27^2); z := (observed_difference - expected_difference)/SE_difference; P := (100 - 99.986)/2.; X2 := sum((obs_freq[i] - expt_freq[i])^2/expt_freq[i],i=1..K); d1 := (1 - 62*.284)^2/(62*.284): d2 := (10 - 62*.485)^2/(62*.485): d3 := (16 - 62*.119)^2/(62*.119): d4 := (35 - 62*.112)^2/(62*.112): X2 := d1 + d2 + d3 + d4;