computing exercise hints

  << back

Chapter 6

Exercise 1.
# Label columns C51, ‘No H’; C52, ‘Total H’; C53, ‘No of trials’; C54, ‘Prop H’.
# Generate no of heads in 50 trials.
RANDOM 100 C1-C50;
BERNOULLI 0.5.
RSUM C1-C50 ‘No H’
# Cumulate no of heads in 50, 100, 150, …trials.
PARSUM ‘No H’ ‘Total H’
# Enter no of trials.
SET
50:5000/50
END
# Calculate proportion of heads.
LET ‘Prop H’ = ‘Total H’/’No of trials’
#Plot results.
TSPLOT ‘Prop H’;
SYMBOL;
CONNECT.

Exercise 2.
# Generate no of wins over 3 games as in previous exercise. Store in C4, label X.
TALLY X

<< back

 

 
Hodder Arnold