This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 1/30/11 PADP 8120: Data Analysis and Sta5s5cal Modeling Probability Distribu.ons Spring 2011 Angela Fer5g, Ph.D. Genera5ng a popula5on in Stata We want to generate a simulated popula5on of 2000 subjects with mean=10, std dev=2, normally distributed: ***simulate popula5on set seed 2010 drawnorm pop, n(2000) means(10) sds(2) kdensity pop save pop.dta, replace clear 1 1/30/11 Sample from the popula5on 50 5mes Let's get a sample of 100 each 5me and save the mean ***sample from popula5on 50 5mes forvalues i=1/50 { use pop bsample 100 sum gen a`i'=r(mean) drop pop drop if _n~=1 save samp`i'.dta, replace } clear Let's look at the distribu5on of the sample means Append all of the means into one dataset, make one variable use samp1.dta forvalues i=2/50 { append using samp`i'.dta } save samp.dta, replace gen id=_n gen sampmean=. forvalues i=1/50 { replace sampmean=a`i' if id==`i' } sum sampmean kdensity sampmean 2 1/30/11 Now let's do it for a crazy popula5on distribu5on Generate your own popula5on distribu5on Make it in excel Then copy it into the data editor and save it Is the distribu5on of the sample means roughly normal? I just wanted you to see it. Now, let's do some hand calcula5ons. Assume that the mean of a sample is 0.5 and the standard devia5on is 0.2. What is the probability that you will draw a random observa5on whose value is greater than 1? Step 1: calculate the zscore Step 2: look up at the z in Table A of the book (or in a z score chart online) and interpret the probability. 3 1/30/11 Let's calculate the standard error for a binary variable Assume that 45% of 1000 people said yes to a polling ques5on. What is the standard error of this propor5on? For next 5me Read A&F Ch. 5 Go to UCLA Stata Starter Kit module webpage: hgp://www.ats.ucla.edu/stat/stata/sk/modules_sk.htm Read through the intermediate data mgmt modules Research proposal due: Research ques5on Detailed descrip5on of variables/ques5ons: Outcome variable Key explanatory variable Homework 3 due February 15 4 ...
View
Full
Document
This note was uploaded on 01/18/2012 for the course PADP 8120 taught by Professor Fertig during the Summer '11 term at University of Georgia Athens.
 Summer '11
 FERTIG

Click to edit the document details