1 midterm review econ 240a. 2 the big picture the classical statistical trail descriptive statistics...
Post on 19-Dec-2015
228 views
TRANSCRIPT
11
Midterm ReviewMidterm Review
Econ 240AEcon 240A
22
The Big PictureThe Big Picture
The Classical Statistical TrailThe Classical Statistical Trail
Descriptive Statistics
Inferential
Statistics
Probability Discrete Random
Variables
Discrete Probability Distributions; Moments
Binomial
Application
Rates &
Proportions
Power 4-#4
44
Descriptive StatisticsDescriptive StatisticsPower One-Lab OnePower One-Lab One
ConceptsConcepts
central tendency: mode, median, meancentral tendency: mode, median, mean
dispersion: range, inter-quartile range, dispersion: range, inter-quartile range, standard deviation (variance)standard deviation (variance)
Are central tendency and dispersion Are central tendency and dispersion enough descriptors?enough descriptors?
55
Concepts Concepts Normal DistributionNormal Distribution– Central tendency: mean or averageCentral tendency: mean or average– Dispersion: standard deviationDispersion: standard deviation
Non-normal distributionsNon-normal distributions
0
20
40
60
80
15 30 45 60 75 90 105 120
Bills
Fre
qu
en
cy
Draw a HistogramDensity Function for the Standardized Normal Variate
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-5 -4 -3 -2 -1 0 1 2 3 4 5
Standard Deviations
Den
sity
The Classical Statistical TrailThe Classical Statistical Trail
Descriptive Statistics Inferential
Statistics
Probability Discrete Random
Variables
Discrete Probability Distributions; Moments
Binomial
Application
Rates &
Proportions
Power 4-#4
Classicall Modern
77
Exploratory Data AnalysisExploratory Data Analysis
Stem and Leaf DiagramsStem and Leaf Diagrams
Box and Whiskers PlotsBox and Whiskers Plots
88
Males: 140 145 160 190 155 165 150 190 195 138 160 155 153 145 170 175 175 170 180 135 170 157 130 185 190 155 170 155 215 150 145 155 155 150 155 150 180 160 135 160 130 155 150 148 155 150 140 180 190 145 150 164 140 142 136 123 155
Females: 140 120 130 138 121 125 116 145 150 112 125 130 120 130 131 120 118 125 135 125 118 122 115 102 115 150 110 116 108 95 125 133 110 150 108
Weight Data
99
1010
Box DiagramBox Diagram
First or lowest quartile;25% of observations below
Upper or highest quartile25% of observations above
median
11113rd Quartile + 1.5* IQR = 156 + 46.5 = 202.5; 1st value below =195
The Classical Statistical TrailThe Classical Statistical Trail
Descriptive Statistics
Inferential
Statistics
Probability Discrete Random
Variables
Discrete Probability Distributions; Moments
Binomial
Application
Rates &
Proportions
Power 4-#4
1313
Power Three - Lab TwoPower Three - Lab Two
ProbabilityProbability
1414
Operations on eventsOperations on events
The event A and the event B both The event A and the event B both occur:occur:
Either the event A or the event B Either the event A or the event B occurs or both do:occurs or both do:
The event A does not occur, i.e.not The event A does not occur, i.e.not A:A:
)( BA
)( BA
A
1515
Probability statementsProbability statements
Probability of either event A or event BProbability of either event A or event B
– if the events are mutually exclusive, thenif the events are mutually exclusive, then
probability of event Bprobability of event B
)()()()( BApBpApBAp
)(1)( BpBp 0)( BAp
1616
Conditional ProbabilityConditional Probability
Example: in rolling two dice, what is Example: in rolling two dice, what is the probability of getting a red one the probability of getting a red one given that you rolled a white one?given that you rolled a white one?– P(R1/W1) ?P(R1/W1) ?
1717
In rolling two dice, what is the probability of getting a red one giventhat you rolled a white one?
1818
Conditional ProbabilityConditional ProbabilityExample: in rolling two dice, what is Example: in rolling two dice, what is the probability of getting a red one the probability of getting a red one given that you rolled a white one?given that you rolled a white one?– P(R1/W1) ?P(R1/W1) ?
)6/1/()36/1()1(/)11()1/1( WpWRpWRp
1919
Independence of two eventsIndependence of two events
p(A/B) = p(A)p(A/B) = p(A)– i.e. if event A is not conditional on event i.e. if event A is not conditional on event
BB– thenthen )(*)( BpApBAp
The Classical Statistical TrailThe Classical Statistical Trail
Descriptive Statistics
Inferential
Statistics
Probability Discrete Random
Variables
Discrete Probability Distributions; Moments
Binomial
Application
Rates &
Proportions
Power 4-#4
2121
Power 4 – Lab TwoPower 4 – Lab Two
2222
H
T
H
T
p
H
T
1-p
p
1 - p
p
H
T
H
T
H
T
H
T
p
1-p
p
1-p
Three flips of a coin; 8 elementary outcomes
3 heads
2 heads
2 heads1 head
2 heads1 head
1 head
0 heads
2323
The Probability of Getting k HeadsThe Probability of Getting k HeadsThe probability of getting k heads The probability of getting k heads (along a given branch) in n trials is: (along a given branch) in n trials is: ppk k *(1-p)*(1-p)n-kn-k
The number of branches with k heads in The number of branches with k heads in n trials is given by Cn trials is given by Cnn(k)(k)
So the probability of k heads in n trials So the probability of k heads in n trials is is Prob(k) = CProb(k) = Cnn(k) p(k) pk k *(1-p)*(1-p)n-kn-k
This is the discrete binomial distribution This is the discrete binomial distribution where k can only take on discrete where k can only take on discrete values of 0, 1, …k values of 0, 1, …k
2424
Expected Value of a discrete Expected Value of a discrete random variablerandom variable
E(x) =E(x) =
the expected value of a discrete the expected value of a discrete random variable is the weighted random variable is the weighted average of the observations where average of the observations where the weight is the frequency of that the weight is the frequency of that observationobservation
n
i
ixpix0
)]([*)(
2525
Variance of a discrete random Variance of a discrete random variablevariable
VAR(xVAR(xii) =) =
the variance of a discrete random the variance of a discrete random variable is the weighted sum of each variable is the weighted sum of each observation minus its expected observation minus its expected value, squared,where the weight is value, squared,where the weight is the frequency of that observationthe frequency of that observation
)]([})]([)({[ 2
0
ixpixEixn
i
2626
Lab TwoLab TwoThe Binomial Distribution, Numbers & PlotsThe Binomial Distribution, Numbers & Plots– Coin flips: one, two, …tenCoin flips: one, two, …ten– Die Throws: one, ten ,twentyDie Throws: one, ten ,twenty
The Normal Approximation to the BinomialThe Normal Approximation to the Binomial– As n As n ∞∞, p(k) N[np, np(1-p)], p(k) N[np, np(1-p)]– Sample fraction of successes: Sample fraction of successes:
]/)1(,[~ˆ
/)1()ˆ(,/)ˆ(,/ˆ 2
npppNp
npnppVarpnnppEnkp
2727
Density Function for the Standardized Normal Variate
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-5 -4 -3 -2 -1 0 1 2 3 4 5
Standard Deviations
Den
sity
1.96-1.96
Z~N(0,1)Prob(-1.96≤z≤1.96)=0.95
npp
pEpz
p
p
/)ˆ1(ˆˆ
ˆ/)]ˆ(ˆ[
ˆ
ˆ
95.0)ˆ*96.1ˆˆ*96.1ˆ(
95.0)ˆ*96.1ˆˆ*96.1(
95.0)ˆ*96.1ˆˆ*96.1(
95.0)96.1ˆ/)]ˆ(ˆ[96.1(
ˆˆ
ˆˆ
ˆˆ
ˆ
pp
pp
pp
p
pppprob
ppprob
ppprob
pEpprob
2.5%2.5%
Lab Three and Power 5,62]1/)0[(2/1*]2/1[)( zezf
2828
Hypothesis Testing: Rates & ProportionsHypothesis Testing: Rates & Proportions
fpH
fpH
a
:
:0
One-tailed test:Step #1:hypotheses
One-tailed test:Step #2: test statistic
npp
fppEpz
p
pp
/)ˆ1(ˆˆ
,ˆ/]ˆ[ˆ/)]ˆ(ˆ[
ˆ
ˆˆ
One-tailed test:Step #3: choose e.g. = 5%
Density Function for the Standardized Normal Variate
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-5 -4 -3 -2 -1 0 1 2 3 4 5
Standard Deviations
Den
sity
Z=1.645
5%
Step # 4: this determinesThe rejection region for H0
Reject if645.1ˆ/)ˆ( fp
2929
Remaining TopicsRemaining TopicsInterval estimation and hypothesis Interval estimation and hypothesis testing for population means, using testing for population means, using sample meanssample meansDecision theoryDecision theoryRegressionRegression– EstimatorsEstimators
OLSOLSMaximum lilelihoodMaximum lilelihoodMethod of momentsMethod of moments
– ANOVAANOVA
3030
Midterm Review Cont.Midterm Review Cont.
Econ 240AEcon 240A
3131
Last TimeLast Time
The Classical Statistical TrailThe Classical Statistical Trail
Descriptive Statistics
Inferential
Statistics
Probability Discrete Random
Variables
Discrete Probability Distributions; Moments
Binomial
Application
Rates &
Proportions
Power 4-#4
3333
Remaining TopicsRemaining TopicsInterval estimation and hypothesis Interval estimation and hypothesis testing for population means, using testing for population means, using sample meanssample meansDecision theoryDecision theoryRegressionRegression– EstimatorsEstimators
OLSOLSMaximum lilelihoodMaximum lilelihoodMethod of momentsMethod of moments
– ANOVAANOVA
3434
PopulationRandom variable xDistribution f(f ?
Sample
Sample Statistic:
),(~ 2Nx
Sample Statistic
)1/()( 2
1
2
nxxsn
ii
Pop.
Lab ThreePower 7
3535
x0 1
f(x)
f(x) in this example is UniformX~U(0.5, 1/12)E(x) = 0.5Var(x) = 1/12
Nonetheless, from the central Limit theorem, the sample meanHas a normal density
nxz
xExz
nNx
x
/)12/1(/]5.0[
/)]([
]/)12/1(,5.0[~
Density Function for the Standardized Normal Variate
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-5 -4 -3 -2 -1 0 1 2 3 4 5
Standard Deviations
Den
sity
3636
Histogram of 50 sample means
05
1015
20
0.05
0.15
0.25
0.35
0.45
0.55
0.65
0.75
0.85
0.95
Mor
e
Sample Mean
Fre
qu
en
cy
Histogram of 50 Sample Means, Uniform, U(0.5, 1/12)
Average of the 50 sample means: 0.4963
3737
InferenceInference
95.0))/(96.1)()/(96.1(Pr
95.0))/(96.1)()/(96.1(Pr
95.0))/(96.1)()/(96.1(Pr
95.0)96.1)//()(96.1(Pr
95.0)96.196.1(Pr
)//(][,
]/,[~
lim
),(~,
2
2
nxnxob
nxnob
nxnob
nxob
zob
nxzso
nNx
eknowittheoremwtrafromthecen
fxingeneral
Density Function for the Standardized Normal Variate
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-5 -4 -3 -2 -1 0 1 2 3 4 5
Standard Deviations
Den
sity
Z=1.96
2.5%
Z=-1.96
2.5%
3838
Confidence IntervalsConfidence IntervalsIf the population variance is known, use the If the population variance is known, use the normal distribution and znormal distribution and z
If the population variance is unknown, use If the population variance is unknown, use Student’s t-distribution and tStudent’s t-distribution and t
)//()( nxz
ni
ii nxxswhere
nsxt
1
2 )1/()(,
)//()(
3939
Text p.253Normal compared to t
t-distribution
t distributionas smple size grows
4040
Appendix BTable 4p. B-9
4141
Hypothesis testsHypothesis tests
vH
vH
a
:
:0
)//(][
/)]([
nvxz
xExz x
Step One: state the hypotheses
Step two: choose the test statistic
Step Three: choose the sizeOf the Type I error, =0.05
Density Function for the Standardized Normal Variate
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-5 -4 -3 -2 -1 0 1 2 3 4 5
Standard Deviations
Den
sity
Z=1.96
2.5%
Z=-1.96
2.5%
Step four: reject the null hypothesis if the test statistic is in the Rejection region
2-tailed test
You choose v
4242
Decision
Accept null
Reject null
True State of Nature
p = 0.5 P > 0.5
No Error 1 -
Type I error C(I)
No Error 1 -
Type II error C(II)
E[C] = C(I)* + C(II)*
4343
Regression EstimatorsRegression Estimators
Minimize the sum of squared Minimize the sum of squared residualsresiduals
Maximum likelhood of the sampleMaximum likelhood of the sample
Method of momentsMethod of moments
4444
Minimize the sum of squared residuals
xbayae
xbay
yyeMin
n
ii
i
n
ii
i
n
ii
n
ii
ˆˆ,0ˆ/ˆ
)ˆˆ(
)ˆ(ˆ.
1
2
2
1
2
11
2
4545
n
ii neLik
1
222 /]ˆ[ˆ,0/ln
Maximum likelihood
Method of moments
n
i
n
iiii xxxxyyb
1 1
2)(/))((ˆ
n
i
n
iiii xxxxyyb
1 1
2)(/))((ˆ
4646
Inference in RegressionInference in RegressionInterval estimationInterval estimation
95.0)ˆˆˆˆ(
95.0)ˆˆˆ(
95.0)ˆˆˆ(
95.0)ˆ/]ˆ[(
ˆ/]ˆ[ˆ/]ˆˆ[
975.ˆ025.ˆ
975.ˆ025.ˆ
975.ˆ025.ˆ
975.ˆ025.
ˆˆ
tbbtbprob
tbbtprob
tbbtprob
tbbtprob
bbbEbt
bb
bb
bb
b
bb
4747
Estimated Coefficients, Power 8Estimated Coefficients, Power 8
CoefficientsStandard
Error t Stat P-value Lower 95%Upper
95%
Intercept -1.02377776 0.727626534 -1.40701 0.167999648 -2.499472762 0.451917
X Variable 1 0.06565026 0.001086328 60.43316 8.58311E-38 0.063447085 0.067853
a
b
41.1727.0/)0204.1(ˆ/)]ˆ(ˆ[ ˆˆ aa aEat
4848
Appendix BTable 4p. B-9
4949
Inference in RegressionInference in RegressionHypothesis testingHypothesis testing
Step OneState the hypothesis
0:
0:0
bHa
bH
Step TwoChoose the test statistic
bbbt ˆˆ/]ˆ[
Step ThreeChoose the size of theType I error,
Step FourReject the null hypothesis if the Test statistic is in the rejection region