Econ 240A - PowerPoint PPT Presentation

1 / 53
About This Presentation
Title:

Econ 240A

Description:

Econ 240A Power Four – PowerPoint PPT presentation

Number of Views:73
Avg rating:3.0/5.0
Slides: 54
Provided by: lla49
Category:
Tags: 240a | discrete | econ | trial

less

Transcript and Presenter's Notes

Title: Econ 240A


1
Econ 240A
1
1
  • Power Four

2
Last Time
  • Probability

3
The Big Picture
4
The Classical Statistical Trail
Rates Proportions
Inferential Statistics
Application
Descriptive Statistics
Discrete Random Variables
Binomial
Probability
Discrete Probability Distributions Moments
5
(No Transcript)
6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
Working Problems
10
Problem 6.61
  • A survey of middle aged men reveals that 28 of
    them are balding at the crown of their head.
    Moreover, it is known that such men have an 18
    probability of suffering a heart attack in the
    next ten years. Men who are not balding in this
    way have an 11 probability of a heart attack.
    Find the probability that a middle aged man will
    suffer a heart attack in the next ten years.

11
P (Bald and MA) 0.28
Bald
Not Bald
Middle Aged men
12
P (Bald and MA) 0.28
P(HA/Bald and MA) 0.18
P(HA/Not Bald and MA) 0.11
Bald
Not Bald
Middle Aged men
13
Probability of a heart attack in the next ten
years
  • P(HA) P(HA and Bald and MA) P(HA and Not Bald
    and MA)
  • P(HA) P(HA/Bald and MA)P(BALD and MA)
    P(HA/Not BALD and MA) P(Not Bald and MA)
  • P(HA) 0.180.28 0.110.72 0.054 .0792
    0.1296

14
This time
15
Random Variables
  • There is a natural transition or easy segue from
    our discussion of probability and Bernoulli
    trials last time to random variables
  • Define k to be the random variable of heads in
    1 flip, 2 flips or n flips of a coin
  • We can find the probability that k0, or kn by
    brute force using probability trees. We can find
    the histogram for k, its central tendency and its
    dispersion

16
Outline
  • Random Variables Bernoulli Trials
  • example one flip of a coin
  • expected value of the number of heads
  • variance in the number of heads
  • example two flips of a coin
  • a fair coin frequency distribution of the number
    of heads
  • one flip
  • two flips

17
Outline (Cont.)
  • Three flips of a fair coin, the number of
    combinations of the number of heads
  • The binomial distribution
  • frequency distributions for the binomial
  • The expected value of a discrete random variable
  • the variance of a discrete random variable

18
Concept
  • Bernoulli Trial
  • two outcomes, e.g. success or failure
  • successive independent trials
  • probability of success is the same in each trial
  • Example flipping a coin multiple times

19
Flipping a Coin Once
The random variable k is the number of heads it
is variable because k can equal one or zero it
is random because the value of k depends on
probabilities of occurrence, p and 1-p
Heads, k1
Prob. p
Prob. 1-p
Tails, k0
20
Flipping a coin once
  • Expected value of the number of heads is the
    value of k weighted by the probability that value
    of k occurs
  • E(k) 1p 0(1-p) p
  • variance of k is the value of k minus its
    expected value, squared, weighted by the
    probability that value of k occurs
  • VAR(k) (1-p)2 p (0-p)2 (1-p) VAR(k)
    (1-p)p(1-p)p (1-p)p

21
Flipping a coin twice 4 elementary outcomes
h, h k2
heads
h, h
Prob p
heads
Prob1-p
Prob p
tails
h, t
h, t k1
Probp
heads
t, h
t, h k1
Prob 1-p
tails
t, t
Prob 1-p
tails
t, t k0
22
Flipping a Coin Twice
  • Expected number of heads
  • E(k)2p2 1p(1-p) 1(1-p)p 0(1-p)2 E(k)
    2p2 p - p2 p - p2 2p
  • so we might expect the expected value of k in n
    independent flips is np
  • Variance in k
  • VAR(k) (2-2p)2 p2 2(1-2p)2 p(1-p)
    (0-2p)2 (1-p)2

23
Continuing with the variance in k
  • VAR(k) (2-2p)2 p2 2(1-2p)2 p(1-p)
    (0-2p)2 (1-p)2
  • VAR(k) 4(1-p)2 p2 2(1 - 4p 4p2)p(1-p)
    4p2 (1-p)2
  • adding the first and last terms, 8p2 (1-p)2
    2(1 - 4p 4p2)p(1-p)
  • and expanding this last term, 2p(1-p) -8p2 (1-p)
    8p3 (1-p)
  • VAR(k) 8p2 (1-p)2 2p(1-p) -8p2 (1-p)(1-p)
  • so VAR(k) 2p(1-p) , or twice VAR(k) for 1 flip

24
  • So we might expect the variance in n flips to be
    np(1-p)

25
Frequency Distribution for the Number of Heads
  • A fair coin

26
One Flip of the Coin
probability
1/2
1 head
O heads
of heads
27
Two Flips of a Fair Coin
probability
1/2
1/4
0
2
of heads
1
28
Three Flips of a Fair Coin
  • It is not so hard to see what the value of the
    number of heads, k, might be for three flips of a
    coin zero, one ,two, three
  • But one head can occur three ways, as can two
    heads
  • Hence we need to consider the number of ways k
    can occur, I.e. the combinations of branching
    probabilities where order does not count

29
Three flips of a coin 8 elementary outcomes
3 heads
2 heads
2 heads
1 head
2 heads
1 head
1 head
0 heads
30
Three Flips of a Coin
  • There is only one way of getting three heads or
    of getting zero heads
  • But there are three ways of getting two heads or
    getting one head
  • One way of calculating the number of combinations
    is Cn(k) n!/k!(n-k)!
  • Another way of calculating the number of
    combinations is Pascals triangle

31
(No Transcript)
32
Three Flips of a Coin
Probability
3/8
2/8
1/8
0
1
2
3
of heads
33
The Probability of Getting k Heads
  • The probability of getting k heads (along a given
    branch) in n trials is pk (1-p)n-k
  • The number of branches with k heads in n trials
    is given by Cn(k)
  • So the probability of k heads in n trials is
    Prob(k) Cn(k) pk (1-p)n-k
  • This is the discrete binomial distribution where
    k can only take on discrete values of 0, 1, k

34
Expected Value of a discrete random variable
  • E(x)
  • the expected value of a discrete random variable
    is the weighted average of the observations where
    the weight is the frequency of that observation

35
Expected Value of the sum of random variables
  • E(x y) E(x) E(y)

36
Expected Number of Heads After Two Flips
  • Flip One kiI heads
  • Flip Two kjII heads
  • Because of independence p(kiI and kjII)
    p(kiI)p(kjII)
  • Expected number of heads after two flips E(kiI
    kjII) (kiI kjII)
    p(kiI)p(kjII)
  • E(kiI kjII) kiI p(kiI) p(kjII)

37
Cont.
  • E(kiI kjII) kiI p(kiI) p(kjII)
    kjII p(kjII) p(kiI)
  • E(kiI kjII) E(kiI) E(kjII) p1 p1
    2p
  • So the mean after n flips is np

38
Variance of a discrete random variable
  • VAR(xi)
  • the variance of a discrete random variable is
    the weighted sum of each observation minus its
    expected value, squared,where the weight is the
    frequency of that observation

39
Cont.
  • VAR(xi)
  • VAR(xi)
  • VAR(xi)
  • So the variance equals the second moment minus
    the first moment squared

40
The variance of the sum of discrete random
variables
  • VARxi yj Exi yj - E(xi yj)2
  • VARxi yj E(xi - Exi) (yj - Eyj)2
  • VARxi yj E(xi - Exi)2
    2(xi - Exi) (yj - Eyj) (yj -
    Eyj)2
  • VARxi yj VARxi 2 COVxiyj VARyj

41
The variance of the sum if x and y are independent
  • COV xiyj E(xi - Exi) (yj - Eyj)
  • COV xiyj (xi - Exi) (yj - Eyj)
  • COV xiyj (xi - Exi) px(i) (yj -
    Eyj) py(j)
  • COV xiyj 0

42
Variance of the number of heads after two flips
  • Since we know the variance of the number of heads
    on the first flip is p(1-p)
  • and ditto for the variance in the number of heads
    for the second flip
  • then the variance in the number of heads after
    two flips is the sum, 2p(1-p)
  • and the variance after n flips is np(1-p)

43
Application
  • Rates and Proportions

44
(No Transcript)
45
(No Transcript)
46
Field Poll
  • The estimated proportion, from the sample, that
    will vote for Guliani is
  • where is 0.35 or 35
  • k is the number of successes, the number of
    likely voters sampled who are for Guliani,
    approximately 122
  • n is the size of the sample, 348

47
Field Poll
  • What is the expected proportion of voters Nov. 7
    who will vote for Guliani?
  • E(k)/n np/n p, where from the
    binomial distribution, E(k) np
  • So if the sample is representative of voters and
    their preferences, 35 should vote for Guliani
    next February

48
Field Poll
  • How much dispersion is in this estimate, i.e. as
    reported by the Field Poll, what is the sampling
    error?
  • The sampling error is calculated as twice the
    standard deviation or square root of the variance
    in
  • VAR(k)/n2 np(1-p)/n2 p(1-p)/n
  • and using 0.35 as an estimate of p,
  • 0.350.65/348 0.000654

49
Field Poll
  • So the sampling error should be 20.026 or 5.2.
  • The Field Poll reports a 95 confidence interval
    or about two standard errors , I.e 22.6 5.4

50
Field Poll
  • Is it possible that Guliani might get 50 of the
    vote or more? Not likely since the probabilty of
    Guliani reciving more then 40 of the vote is
    only 2.5
  • Based on a normal approximation to the binomial,
    the true proportion voting for Guliani should
    fall between 29.5 and 40.5 with probability of
    about 95, unless sentiments change.

51
(No Transcript)
52
(No Transcript)
53
Lab Two
  • The Binomial Distribution, Numbers Plots
  • Coin flips one, two, ten
  • Die Throws one, ten ,twenty
  • The Normal Approximation to the Binomial
Write a Comment
User Comments (0)
About PowerShow.com