1) Discrete distribution: militia men. Click here and a SAS/Insight program will appear in your browser window. Click on "File>Save As..." in Netscape and choose "Save in: D: " then click "Save". The program should now be saved on the D drive of your computer. The file's name is "lab5.sas". Return to this page by choosing "GO>Back" from the Netscape menu bar. To get started, open SAS by clicking "Start>Programs>Statistics and Mathematics>SAS System v6.11". Once the SAS environment appears, click on "File>Open". In the "Open" window, type "D:\lab5.sas" in the "File name:" field and then click "Open". Next, find the button on the menu bar with a picture of a running person. Click on this button. A spreadsheet will appear.
This data set does not represent a sample, it represents a probability distribution for the random variable 'Chest Size' of Scottish Militia men. Make a scatter plot of 'PROB' (y-axis) vs. 'SIZE,' this is a barplot (invisible bars!) of the distribution of chest size among Scottish militia men. Describe the distribution (symmetric, right or left skewed, unimodal or multi-modal). Calculate the mean and variance of the distribution. Be careful, calculating sample stats will not do it. Think about the formula for mean and variance and create a new column or two, then calculate summary statistics to obtain column sums.
Click on "File>End" on the SAS/Insight menu bar to quit the program.
2) Binomial Distribution. The following link is to a dynamic bar plot of binomial probabilities. You can change the "success" probability (pi) and the number of "trials" (n). Compare the shape (symmetric, right or left skewed) of the distribution a) fixing pi=0.5 and letting n=20 and n=10 and b) fixing n=20 and letting pi=0.1, 0.25, 0.75, and 0.9. For each combination of n and pi, locate the distribution's mode and calculate its mean. Here is the link: binomial java script, courtesy of Balasubramanian Narasimhan of Stanford University.