Logo

A Variety of Distributions

David C. Howell

bar bar

 

SPSS Program to Generate Samples from Populations

This demonstration can be used in several ways. Either the instructor or the student can enter the relevant program and simply run it off as given. Students can compare the shapes of the various distributions and note the relationship between the descriptive statistics and the characteristics of the plots. Note in particular that even with large samples, several of these distributions look to the eye like the normal distribution, even though they are not normal. This is especially true when the normal curve is not superimposed.

In addition to just using the program as written, you can


Copy the following program exactly as it is written. Be careful about putting in all the periods and don't have unquoted periods in comments.


* This SPSS program generates samples from a variety of distributions, calculates 



* descriptive statistics, and plots the results.



* I have superimposed a normal curve on each histogram for comparison purposes.



* Note the descriptive statistics and how they are revealed in the plots.



* You will see several of these distributions later, and can come back to this program,



* alter the parameters, and see what happens. I



* In fact, why not alter them now and see what happens?



* Last modified 3/27/96  David C Howell.







Input program.



	Loop #i = 1 to 5000.



			* Data from a normal distribution with mean = 0 and std = 1.



		Compute xnorm = rv.normal(0,1).



			* Data from a chi-square distribution with 2 degrees of freedom.



		Compute xchisq = rv.chisq(2).



			* Data from an exponential distribution with rate of decay = 2.



		Compute xexpon = rv.exp(2). 



			* Data from a logistic distribution.



		Compute xlogist = rv.logistic(0,1).



			* Data from a binomial distribution with n = 5 and p = .80.



		Compute xbinom = rv.binom(5, 0.8).



		End Case.



	 End Loop.



	End File.



End Input Program.







Examine Vars = all



	/Plot StemLeaf Boxplot  /*Boxplots hard to read because outliers are identified.



	/Statistics.







Graph



	/Histogram(normal) = xnorm.



Graph



	/Histogram(normal) = xchisq.	



Graph



	/Histogram(normal) = xexpon.



Graph



	/Histogram(normal) = xlogist.



Graph



	/Histogram(normal) = xbinom.	



bar bar

 

Home Icon Return to Dave Howell's Statistical Home Page  

 

Planetary 



Cows Icon University of Vermont Home Page  






Send mail to: David.Howell@uvm.edu)

Last updated 6/30/98