*If you copy and paste these notes into a Do-File, you can practice on your
own.
*Mean and Median
use http:/amu-chemlab.avemaria.edu/~martinez/ECON230/mpg, clear
describe
hist mpg
* How is this histog
*More exercises
use http:/amu-chemlab.avemaria.edu/~martinez/ECON230/amount_spent.dta
describe
br
tabstat amountspent, stat(mean)
hist a
tabstat amountspent, stat(mean median)
tabstat am if am<50, sta
clear
set obs 1000 /*Create one thousand spaces for data*/
set seed 1
/*Start at a particular point in the random number list. This
way we can repeat the random draw and always get the same number*/
g
Study Guide Quiz 1
Definitions
Chapter 1
Method of comparison
Treatment group
Randomized controlled
experiment
Chapter 2
Observational study
Confounder
Treatment
Control group
Placebo
Response
Confoun
*If you copy and paste these notes into a Do-File, you can practice on your
own.
sysuse auto.dta
describe
label variable length "Length (inches)"
scatter mpg rep78
notes
notes length: Change label on
*Ch 5 The Normal Approximation to Data
* The Normal Distribution
sysuse census, clear
*what does the following command do?
gen divorcert = divorce/pop*1000
sum divorcert
*is this variable Normally dis
Notes Chapter 3 Freedman, Pisani, and Purves
Exercises
Bar Charts and Pie Charts
In PowerPoint,
o insert a table and content slide. Click on the chart icon. Select Bar
(or Pie) Chart
o Paste (or inpu
sysuse auto
/*Changing the scale of the data doesn't change the correlation*/
scatter mpg headroom, name(imperial, replace)
corr mpg headroom
/*1 mile per gallon = 0.425143707 kilometers per liter*/
g
*Read chapters 1, 2, 5, 6, 13, 14, 15 in "Getting Started with Stata".
*Most of these are REALLY SHORT chapters
*Then copy all of the text in this webpage on a Do-file (see chapter 13)
*Open the Censu
Notes Chapter 3 Freedman, Pisani, and Purves
Exercises
Histogram
Summarizing data
o In blocks
Horizontal scale
o Each block represents a range of values
o The width of each block is the same
No ver
Notes for Chapter 11, FPP
use http:/amu-chemlab.avemaria.edu/~martinez/ECON230/testgrades.dta
Copy the variable test1 into an Excel sheet. Do the same for final. Close
Stata.
Calculate the slope of th
*Ch 5 The Normal Approximation to Data
*In Stata, the command normal( ) returns the cumulative probability
associated with the standard normal variable.
*For example if we would like to find the area
Statistical Inference
A short summary
Get a sample
o Other peoples samples (out of the same population) may be different
Calculate descriptive statistics (such as the sample mean).
o Law of large numb
* * One-sample tests *
* 1. A team of researchers is interested in the ecological health of the
Ozark Highland ecoregion in Arkansas. To measure ecological health, they are
using the Index of Biologic
ssc install hangroot
clear
set obs 1000
gen ten = rbinomial(10,0.5)
/*Suppose you tossed a coin 10 times, and counted the heads.*/
gen thirty = rbinomial(30,0.5)
gen threehundred = rbinomial(300,0.5)