Assignment title: Information


STA 4821 Homework 5 (Central Limit Theorem) 20 Points Adapt the code and run it (in the language of your choice). Fill in the table. Show all theoretical calculations. Attach actual simulation code and output. 100 INPUT n 200 FOR i = 1 TO 1000 300 FOR j = 1 TO n generate X 400 S = S + X 500 NEXT j 600 IF (S/n > 0.45) AND (S/n < 0.55) THEN c = c + 1 700 S = 0 800 NEXT i 900 PRINT c/1000 P 45.0( < X (n)< 55.0 ) n = 1 n = 25 n = 100 X theory (exact) simulation theory (CLT) simulation theory (CLT) simulation X ~ U(0,1) X ~ exp(2) P(X = 0.2) = 0.8 P(X = 1.7) = 0.2