SUGGESTIONS FOR HOMEWORK FOR OCTOBER 12:
Note: Instructions may vary slightly depending on the platform and version of the software you are using.
Minitab:
- To form the 1000 simulations of the binary random variable, put 0 and 1 in c1, and their respective probabilities in c2. From the Calc menu, choose Random Data, then Discrete. Fill in the appropriate blanks. (1000 rows; put in a range of ten blank columns, one for each binary random variable.)
- To sum the ten columns, use Row Statistics from the Calc menu
- To make the histogram, use Histogram from the Graph menu. Click Options to set the bins as you desire. (Click Help for help on notation.)
- To make the normal curve on the histogram: First use Set Patterned Data from the Calc menu to create a column Grid with numbers in increments of 0.1 going form 0 to whatever you decide they should go to. Then on the Calc menu, choose Probability Distributions, then Normal. Put Grid for your input, pdf for output. Put in whatever mean and standard deviation you think you need. This will give you a column consisting of the values of the normal pdf at the inputs in the column Grid. Now set up the histogram as before. Under Options, choose Density. Under Annotation, choose Line. In the resulting dialogue box, type "grid pdf" (no quotes) under "points." Click on "type", then OK, etc.
Excel
(I am less familiar with Excel than I am with Minitab, so there might be better ways to do some of these things.)
- You will need the Data Anlysis Toolpak.
- To get the 1000 samples from one binary r.v. in a column: For p = 1/2, put 0 and 1 in any two convenient cells. On the Tools menu, choose Data Analysis, then Sampling. Enter the two cells containing 0 and 1 as input range. Fill out other parts as appropriate. (For different p, just use a different proportion of 0's and 1's -- for example, if p = 1/4, use input with three 0's and one 1.)
- Repeat the above procedure for each of the other independent binary variables.
- Think about what is an appropriate way to get good bins. (Use Help if needed for how Excel makes bins.)
- As far as I can figure out, you will need to draw the normal curve by hand. But maybe you can figure out some better way. If you do draw it by hand, be sure that you are drawing (and explain how you are drawing) the normal curve with the appropriate mean and variance, and not just putting in one that seems to fit. What might be easier: Use Excel to draw the normal curve, then draw the histogram by hand. (You can decide on the bins and have Excel tell you how many values go in each.) To draw the normal curve: Put values from a suitable min to a suitable min in one column. Use NORMDIST to get the values of the appropriate normal pdf in another column. Then draw a scatterplot using the two columns.