Random Variables - PowerPoint PPT Presentation

About This Presentation
Title:

Random Variables

Description:

Random Variables A random variable A variable (usually x) that has a single numerical value (determined by chance) for each outcome of an experiment – PowerPoint PPT presentation

Number of Views:454
Avg rating:3.0/5.0
Slides: 42
Provided by: Homeu213
Category:

less

Transcript and Presenter's Notes

Title: Random Variables


1
Random Variables
  • A random variable A variable (usually x) that
    has a single numerical value (determined by
    chance) for each outcome of an experiment
  • A random variable can be classified as being
    either discrete or continuous depending on the
    numerical values it assumes.
  • A discrete random variable may assume either a
    finite number of values or an infinite sequence
    of values.
  • A continuous random variable may assume any
    numerical value in an interval or collection of
    intervals with no gaps or interruptions.

2
  • A random variable x takes on a defined set of
    values with different probabilities.
  • For example, if you roll a die, the outcome is
    random (not fixed) and there are 6 possible
    outcomes, each of which occur with probability
    one-sixth.
  • For example, if you poll people about their
    voting preferences, the percentage of the sample
    that responds Yes on Proposition 100 is a also
    a random variable (the percentage will be
    slightly differently every time you poll).

3
  • Two types of random variables
  • A discrete random variable has a countable number
    of possible values.
  • X number of hits when trying 5 free throws.
  • A continuous random variable takes all values in
    an interval of numbers.
  • X the time it takes for a bulb to burn out.
  • The values are not countable.

4
  • Discrete random variables have a countable number
    of outcomes
  • Examples
  • Binary Dead/alive, treatment/placebo, disease/no
    disease, heads/tails
  • Nominal Blood type (O, A, B, AB), marital
    status(separated/widowed/divorced/married/single/c
    ommon-law)
  • Ordinal (ordered) staging in breast cancer as I,
    II, III, or IV, Birth order1st, 2nd, 3rd, etc.,
    Letter grades (A, B, C, D, F)
  • Counts the integers from 1 to 6, the number of
    heads in 20 coin tosses

5
  • A continuous random variable has an infinite
    continuum of possible values.
  • Examples blood pressure, weight, the speed of a
    car, the real numbers from 1 to 6.
  • Time-to-Event In clinical studies, this is
    usually how long a person survives before they
    die from a particular disease or before a person
    without a particular disease develops disease.

6
Random Variables
  • Question Random Variable x Type
  • Family x Number of dependents in
    Discrete
  • size family reported on tax
    return
  •  
  • Distance from x Distance in miles
    from Continuous
  • home to store home to the store site
  • Own dog x 1 if own no pet
    Discrete
  • or cat 2 if own dog(s) only
  • 3 if own cat(s) only
  • 4 if own dog(s) and cat(s)

7
Probability Distributions
  • The probability distribution for a random
    variable describes how probabilities are
    distributed over the values of the random
    variable. It gives the probability for each
    value of the random variable
  • The probability distribution is defined by a
    probability function which provides the
    probability for each value of the random variable.

8
Continuous Probability Distributions
  • A continuous random variable can assume any
    value in an interval on the real line or in a
    collection of intervals.
  • It is not possible to talk about the probability
    of the random variable assuming a particular
    value. Ex x2
  • Instead, we talk about the probability of the
    random variable assuming a value within a given
    interval.
  • Continuous random variables are usually
    measurements.

9
Continuous Probability Distributions
  • The probability of the random variable assuming
    a value within some given interval from x1 to x2
    is defined to be the area under the graph of the
    probability density function between x1 and x2.

10
  • Discrete Random Variable
  • Suppose X is a discrete random variable
  • The probability distribution of X lists the
    values and their probabilities.
  • The probabilities must sum up to one.
  • The probability of any event can be found by
    adding the probabilities for those values that
    make up the event.

11
Discrete example roll of a die
12
Cumulative distribution function (CDF)
13
Examples
1. Whats the probability that you roll a 3 or
less? P(x3)1/2 2. Whats the probability
that you roll a 5 or higher? P(x5) 1
P(x4) 1-2/3 1/3
14
The number of ships to arrive at a harbor on any
given day is a random variable represented by x.
The probability distribution for x is x 10
thru 14 and the probabilities are .4, .2, .2, .1,
.1 respectfully.
Find the probability that on a given day a.   
exactly 14 ships arrive b.    At least 12 ships
arrive c.    At most 11 ships arrive
 p(x14) .1
p(x?12) (.2 .1 .1) .4
p(x11) (.4 .2) .6
15
  • You are lecturing to a group of 1000 students.
    You ask them to each randomly pick an integer
    between 1 and 10. Assuming, their picks are
    truly random
  • Whats your best guess for how many students
    picked the number 9?
  • Since p(x9) 1/10, wed expect about 1/10th of
    the 1000 students to pick 9. 100 students.
  • What percentage of the students would you expect
    picked a number less than or equal to 6?
  • Since p(x 6) 1/10 1/10 1/10 1/10 1/10
    1/10 .6 60

16
The uniform distribution all values are equally
likely The uniform distribution f(x) 1 , for
1? x ?0
We can see its a probability distribution
because it integrates to 1 (the area under the
curve is 1)
17
Discrete case
Continuous case
18
the lottery
  • The Lottery (also known as a tax on people who
    are bad at math)
  • A certain lottery works by picking 6 numbers from
    1 to 49. It costs 1.00 to play the lottery, and
    if you win, you win 2 million after taxes.
  • If you play the lottery once, what are your
    expected winnings or losses?

19
Calculate the probability of winning in 1 try
49 choose 6 Out of 49 numbers, this is the
number of distinct combinations of 6.
The probability function (note, sums to 1.0)
20
Expected Value
E(X) P(win)2,000,000 P(lose)-1.00
2.0 x 106 7.2 x 10-8 .999999928 (-1) .144 -
.999999928 -.86  
E(X) P(win)2,000,000 P(lose)-1.00
2.0 x 106 7.2 x 10-8 .999999928 (-1) .144 -
.999999928 -.86  
21
OUCH
If you play the lottery every week for 10 years,
what are your expected winnings or losses?
  520 x (-.86) -447.20
22
Gambling (or how casinos can afford to give so
many free drinks)
A roulette wheel has the numbers 1 through 36, as
well as 0 and 00. If you bet 1 that an odd
number comes up, you win or lose 1 according to
whether or not that event occurs. If random
variable X denotes your net gain, X1 with
probability 18/38 and X -1 with probability
20/38.   E(X) 1(18/38) 1 (20/38)
-.053   On average, the casino wins (and the
player loses) 5 cents per game.   The casino
rakes in even more if the stakes are
higher   E(X) 10(18/38) 10 (20/38)
-.53   If the cost is 10 per game, the casino
wins an average of 53 cents per game. If 10,000
games are played in a night, thats a cool 5300.
23
Probability Distribution for Number of US Air
Crashes
x
P(x)
0.210 0.367 0.275 0.115 0.029 0.004 0 0
0 1 2 3 4 5 6 7
24
Probability Histogram
0.40 0.30 0.20 0.10 0
Probability
0 1 2 3 4 5 6 7
Number of USAir Crashes
25
  • Flip a coin 4 times
  • Find the probability distribution of the random
    variable describing the number of heads that turn
    up when a coin is flipped four times.
  • Solution
  • Probability Histogram

26
Probability Histogram
27
Continuous Random Variable spinner
28
  • Continuous Distribution
  • The probability of any event is the area under
    the density curve and above the values of X that
    make up the event.

29
  • Continuous Distribution
  • The probability model for a continuous random
    variable assigns probabilities to intervals of
    outcomes rather than to individual outcomes.
  • In fact, all continuous probability distributions
    assign probability 0 to every individual outcome.
  • The spinner
  • Normal distributions are continuous probability
    distributions.

30
Means Variances of Discrete Random Variables
  • For a discrete r.v. X with values xi, that occur
    with probabilities p(xi), the mean of X is
  • The variance of X is

31
Flip a coin 4 times
  • How many heads will turn up on average when a
    coin is flipped four times?

1/16
4/16
6/16
4/16
1/16
32
Example Car Sales
  • The total number of cars to be sold next week is
    described by the following probability
    distribution
  • Determine the expected value and standard
    deviation of X, the number of cars sold.

33
Rules for Mean
34
Rules for Variances
  • If X is a r.v. and a and b are constants, then
  • If X and Y are independent random variables and a
    and b are constants, then
  • In particular,

35
Parameters and Statistics
  • Parameter a numerical characteristic of a
    population. Its fixed but unknown in practice.
  • Population mean
  • Statistic a numerical characteristic of a
    sample. Its known once a sample is obtained. We
    often use a statistic to estimate an unknown
    parameter.
  • It can change from sample to sample.
  • Sample mean
  • Statistical inference use a fact about a sample
    to estimate the truth about the whole population.

36
Law of Large Numbers
  • Draw independent observations at random from any
    population with finite mean. As the number of
    observations drawn increases, the sample mean
    of the observed values eventually approaches the
    mean of the population as closely as you want and
    then stays that close.
  • House edge?
  • Is there a winning system for gambling?

37
Expected Value
The Expected value is the same as the mean. E
µ
The average value of outcomes E S x P(x)
38
Mean, Variance and Standard Deviation of a
Probability Distribution
µ S x P(x) s2 S (x µ)2 P(x) s2 S
x2 P(x) µ 2 s S x 2 P(x) µ 2
39
Mean and Variance
40
Mean and Variance
41
ANSWER
Write a Comment
User Comments (0)
About PowerShow.com