void page1() { generateGraph(1, false, 0); image(pg, 400, 200); String t = "Step 1"; textFont(myboldfont, 18); text(t, 30, 110); textFont(myfont, 18); if (aStudy.testvalue>3.69) { value = .9999; t = "Open Table A.3 in the back of the book. Since z* = " + nf(aStudy.testvalue, 1, 2) +", look for the largest value possible, which are row 3.6 and column 0.09"; drawStrings(t, 30, 140, 25); text("0.09", 265, 210); text("3.6", 130, 300); text("0.9999", 250, 300); } else if (aStudy.testvalue<-3.69) { value = .0001; t = "Open Table A.3 in the back of the book. Since z* = " + nf(aStudy.testvalue, 1, 2) +", look for the smallest value possible, which are row -3.6 and column 0.09"; drawStrings(t, 30, 140, 25); text("0.09", 265, 210); text("-3.6", 130, 300); text("0.0001", 250, 300); } else { value = (float)(Probability.normcdf(aStudy.testvalue)); float row = int(aStudy.testvalue * 10.0) / 10.0; float col = round(abs(aStudy.testvalue-row) * 100.0) / 100.0; t = "Open Table A.3 in the back of the book. Since z* = " + nf(aStudy.testvalue, 1, 2) + ", look for row " + nf(row, 1, 1) + " and column " + nf(col, 1, 2); drawStrings(t, 30, 140, 25); text(nf(col, 1, 2), 265, 210); text(nf(row, 1, 1), 130, 300); text(nf(value, 1, 4), 250, 300); } image(smalldown, 265, 230); image(smallright, 190, 275); t = "Thus, the left-tailed value (in red) equals " + nf(value, 1, 4); text(t, 30, 350); leftarrow.setVisible(false); rightarrow.setVisible(true); }