Download Random Variable Discrete Random Variable Continuous Random

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Random Variable & Discrete Distribution
Random Variable
Theoretical Probability Distribution
• Random Variable
• Discrete Probability Distributions
A variable that assumes a numerical
description for the outcome of a
random experiment (by chance).
Usually is denoted by a capital letter.
X, Y, Z, ...
Very useful for mathematically
modeling the distribution of variables.
1
2
Discrete Random Variable
Continuous Random Variable
Discrete Random Variable:
Continuous Random Variable:
A random variable assumes
discrete values by chance.
A random variable that can
take on any value within a
specified interval by chance.
3
4
Discrete Random Variable
Discrete Probability Distribution
Example: (Toss a balanced coin)
If a balanced coin is tossed, Head and Tail are
equally likely to occur,
X = 1, if Head occurs, and
X = 0, if Tail occurs.
P(X=1) = .5 = 1/2 and P(X=0) = .5 = 1/2
P(Head) = P(X=1) = P(1) = .5
P(Tail) = P(X=0) = P(0) = .5
Probability mass function:
P(X=x) =.5 , if x = 0, 1,
and P(X=x) = 0 , elsewhere.
1/2
0
1
P(all possible outcomes) = P(X=1 or 0)
= P(X=1) + P(X=0)
= 1/2 + 1/2
= 1.0
Total probability is 1.
Total probability is 1.
5
6
Random Variable - 1
Random Variable & Discrete Distribution
Discrete Uniform Probability
Distribution
Discrete Random Variable
Example: What is probability of getting a
number less than 3 when roll a balanced
die?
Probability mass function:
P(X=x) =1/6, if x=1,2,3,4,5,or 6,
and P(X=x) = 0 elsewhere.
Probability Mass Function for
Discrete Uniform Distribution:
P(x) = c, c is a constant
1/6
1
2 3 4 5 6
P( X < 3 ) = P( X ≤ 2) = P(X = 1) + P(X = 2)
= 1/6 + 1/6 = 2/6
• Balanced Coin: P(x) = 1/2, for x = 0,1
• Balanced Die:
P(x) = 1/6, for x = 1,2,3,4,5,6
7
Discrete Random Variable
Balanced Die:
8
Other Discrete Distributions
P(x) = 1/6, for x = 1,2,3,4,5,6
P(X=3) = 1/6
P(X=5) = 1/6
•
•
•
•
•
Bernoulli
Binomial
Poisson
Geometric
…
9
10
Bernoulli Trial
Bernoulli Distribution Model
(Bernoulli Probability Distribution)
Definition: Bernoulli trial is a random
experiment whose outcomes are classified as
one of the two categories. (S , F) or (Success,
Failure) or (1, 0)
Example:
Tossing a coin, observing Head or Tail
Observing patient’s status Died or Survived.
11
12
Random Variable - 2
Random Variable & Discrete Distribution
Bernoulli Probability Distribution
Example: In a random experiment of
casting a balanced die, we are only
interested in observing 6 turns up or
not. It is a Bernoulli trail.
Example: (Tossing a balanced coin)
P(S) = P(X=1) = p = .5
P(F) = P(X=0) = 1 − p = .5
P(6) = P(X=1) = p = 1/6
Bernoulli Distribution
P(6’) = P(X=0) =1 − 1/6 = 5/6
.5
0
Bernoulli Probability Distribution
Bernoulli Distribution
1
0
13
1
14
Binomial Experiment
Binomial Distribution Model
(Binomial Probability Distribution)
A random experiment involving a
sequence of independent and
identical Bernoulli trials.
Example:
Toss a coin ten times, and observing Head
turns up.
Roll a die 3 times, and observing a 6 turns up
or not.
15
Binomial Probability Model
In a random sample of 5 from a large
population, and observing subjects’ disease
status. (Almost binomial)
16
Binomial Probability Model
In a binomial experiment involving n
independent and identical Bernoulli trials each
with probability of success p, the probability of
having x successes can be calculated with the
binomial probability mass function, and it
is, for x = 0, 1, …, n,
A model to find the probability of
having x number successes in a
sequence of n independent and
identical Bernoulli trials.
P( X = x) =
17
n!
⋅ p x ⋅ (1 − p ) n − x
x!⋅(n − x)!
⎛ n⎞
= ⎜⎜ ⎟⎟ ⋅ p x ⋅ (1 − p ) n − x
⎝ x⎠
18
Random Variable - 3
Random Variable & Discrete Distribution
(6, 6’, 6’)
Factorial
Binomial Probability
0! = 1
3! = 1·2·3 = 6
⎛ 5⎞
⎝ 2⎠
Example: ⎜ ⎟ =
Identify n = 3, p = 1/6, x = 2
5!
5 ⋅ 4 ⋅ 3 ⋅ 2 ⋅1
=
= 10
(5 − 2)!2! 3 ⋅ 2 ⋅1 ⋅ 2 ⋅1
3!
·(1/6)2·(5/6)3-2
2! 1!
= 3·(1/6)2·(5/6)1
= .069
n!
P (X = x ) =
P(X=2) =
x!⋅(n − x )!
19
Binomial Probability
20
Example: In the previous problem, what is the
probability that 4 or more people have the
disease?
(Assume binomial experiment.)
Identify n = 5, x = 4, p = .10
Identify n = 5, x = 4, p = .10
P(X≥4) = P(X=4) + P(X=5)
P (X = x ) =
⋅ p x ⋅ (1 − p ) n − x
Binomial Probability
Example: If there are 10% of the population in
a community have a certain disease, what is the
probability that 4 people in a random sample of
5 people from this community has the disease?
5!
P(X=4) =
·(.10)4·(1 − .10)5-4
4! 1!
= 5·(.10) 4(.90)1
= .0004
(6’, 6, 6’)
Example: A balanced die is rolled three times
(or three balanced dice are rolled), what is the
probability to see two 6’s?
n! = 1·2·3·... ·n
Example:
(6’, 6’, 6)
5!
5! 0!
= .00045 +
n!
⋅ p x ⋅ (1 − p ) n − x
x!⋅(n − x )!
21
Parameters of Binomial
Distribution
·(.10)5·(1 −.10)5-5
= .00045 + .00001 = .00046
(What is this number telling us?)
22
Binomial Distribution
P(0) = .5905
n = 5, p = .10
Parameters of the distribution:
Mean of the distribution, µ = n·p
Variance of the distribution, σ2 = n·p·(1 − p)
Standard deviation, σ , is the square root of
variance.
µ = 5 x .10 = .5
P(1) = .3281
σ2 = 5 x .1 x (1−.1) = .45
P(2) = .0729
P(3) = .0081
0.590
P(4) = .0004
P(5) = .00001
0
23
1
2
3
4
5
24
Random Variable - 4
Random Variable & Discrete Distribution
Discrete Probability Models
Poisson Distribution
Bernoulli : Two categories of outcomes.
Binomial : Number of successes in a
binomial experiment.
Poisson : Number of successes in a
given time period or in a given unit
space.
Let X represents the number of occurrences
of some event of interest over a given
interval from a Poisson process, and the λ is
the mean of the distribution, then the
probability of observing x occurrences is,
for x = 0, 1, 2, …,
−λ x
P( X = x) = e λ
x!
It can be used to approximate Binomial prob., for large n.
25
Poisson Process
e = 2.71828…
26
Examples of Poisson Process
The probability that a single event
occurs within an interval is proportional
to the length of the interval.
Within a single interval, an infinite
number of occurrences is possible.
The events occur independently both
within the same interval and between
consecutive non-overlapping intervals.
Number of people visiting to the
emergency room for treatment per hour.
Number of customers coming to the
Arby’s to buy sandwich per ten minutes.
27
Poisson Probability
Poisson Probability
If on average there are 4 people catch flu in a
given week in a community during a certain
season, what is the probability of observing 2
people catch flu in this community in a given
week period during the season? (Assume the
number of people catching flu in a given period
of time follow a Poisson Process.)
λ=4
x=2
e −4 42
P(X=2) =
= .1465
2!
28
−λ x
P ( X = x) = e λ
x!
29
If on average there are 4 people catch flu in a
given week in a community during a certain
season, what is the probability of observing 2
people catch flu in this community in a given
two weeks period during the season? (Assume
the number of people catching flu in a given
period of time follow a Poisson Process.)
λ = 4x2 = 8
x=2
e −8 82
P(X=2) =
= .011
2!
−λ x
P ( X = x) = e λ
x!
30
Random Variable - 5
Random Variable & Discrete Distribution
Poisson Probability
Discrete Probability Models
If on average there are 4 people catch flu in a
given week in a community during a certain
season, what is the probability of observing less
than 2 people catch flu in this community in a
given week period during the season? (Assume
the number of people catching flu in a given
period of time follow a Poisson Process.)
λ=4
x = 0 and 1
P(X<2) = P(X=0) + P(X=1)
= (e-4·40)/0! + (e-4·41)/1! = .0916
31
Binomial : Number of successes in a
binomial experiment. (There is a sample
taken.)
Poisson : Number of successes in a
given time period or in a given unit
space. (No sample taken.)
32
Random Variable - 6
Related documents