** Open data we are going to use today use class1.dta * Create relative frequency of Freedom Status ** can abbreviate tabulate command with tab tab freedomstat * Create histogram of freedom status histogram freedomstat, discrete fraction xlabel(1 "Not Free" 2 "Partly Free" 3 "Free") * Create histogram of gdppc histogram gdppc, width(5000) fraction * Summarize gdp per capita ** can abbreviate summarize command with sum sum gdppc, det * Create confidence interval for the mean of gdppc ci gdppc * generate a variable called "rich" gen rich = gdppc > 11495 + (2*11176.78) * Make a confidence interval for the proportion of rich countries ci rich, binomial *** Exercise 1 *** *1. tab polrts *2. median: 1, mode: 0 *3. histogram polrts, width(.25) fraction *** Exercise 2 *** *1. sum pop, det * Mean: 27158, Median: 7177.11, SD: 83015.55 *2. Distribution is skewed positive (to the right) because mean is bigger than median. *** Exercise 3 *** *1. sum gdppc gen gdp_new = gdppc - 11495.48 ci gdp_new *2. sum gdppc gen poor = gdppc < (11495.48 - (.5*11176.78)) ci poor, binomial