***************
  Exercise  3.69.
***************
 

Here are instructions on how to simulate the results of a Simple Random Sample (SRS) using EXCEL
instead of using Table B.

 
Open the "Random Number Generation" window from the Data Analysis toolbox,
and fill it in like below:
 
 


 

This will generate  10 Uniform Random Numbers (URN) in column A.
 


 

"Yes" responses are represented by those individuals whose URN is less than 0.2.

To count how many such "Yes" responses are in the random sample, use the function "COUNTIF"
as shown in the image above.  The function simply checks whether the condition "<.2" (i.e. "Yes") holds, for each
entry in cells A1:A10, and reports the count.

*Note*  In the above table , p-hat = 3/10 = .3 is a sample-based estimate of the population parameter,
p = 0.20.
 

To generate several samples of the same size, say 20 SRS of size 10 (as in part (b)  of
textbook exercise 3.69), is to select 20 (instead of 1) for the "Number of Variable" field in the RNG window
and 10 for the "Number of Random Numbers".  This will fill the field A1:T10, each column being a SRS.

You may also generate 20 SRS of size 10 by choosing 10  for the "Number of Variable"
and 20 for the "Number of Random Numbers"
.  This will fill the field A1:J20, each row being a SRS .

To make  the grading simpler, please use the  seed 921 when you answer  part (b) of textbook exercise 3.69.
 
 

Hand in a one page Excel worksheet with the answers to  part  (b) of textbook Ex. 3.69
in the following format:
 

The list of the one  SRS, consisting of 2 rows:
        - the 10 random numbers in the cells A1:J1,
        - the corresponding "yes"/"no" responses in the cells A2:J2,

The complete list of 20 SRS in the field A4:J23, and the 20 separate values of "p-hat"
( the proportion of Yes's) in cells K4:K23.

The mean of the p-hats in the cell K25.

In cell M25, report (numerically) how close to the corresponding population parameter is your
average estimate.