Uploaded by M Noufal

3.0 Discrete random variable and Probability distribution

advertisement
2.0 Discrete Random Variables
and
Probability Distributions
1
• Random Variable: A function that assigns numerical values to all the outcomes in the
sample space.
• Notation: Capital letters (like Y) denote a random variable. Lowercase letters (like y)
denote possible values of the random variable.
• Discrete Random Variable : A numerical r.v. that takes on a countable number of
values (there are gaps in the range of possible values).
Examples:
1. Number of phone calls received in a day by a company
2. Number of heads in 5 tosses of a coin
• Continuous Random Variable : A numerical r.v. that takes on an uncountable
number of values (possible values lie in an unbroken interval).
Examples:
• 1. Length of nails produced at a factory
• 2. Time in 100-meter dash for runners
2
Probability Distributions for Discrete Random Variables
• A probability distribution of a random variable is a graph, table, or formula
which tells us how the total probability (of 1) is distributed among (allocated to)
the various possible values of a random variable
– A listing of the possible values and corresponding probabilities of the
random variable, or a formula for the probabilities
• For discrete random variables the probability mass function (pmf)
•
determines how the probability is distributed
- For a discrete random variable X with possible values x1 ,x2,…,xn,
a probability mass function is a function such that:
3
Example1:
A design firm submits bids for four projects. Let Y = number of successful bids.
y
P(y)
0
1
2
3
4
0.06
0.35
0.43
0.15
0.01
Example 2:
Toss 2 coins. The r.v. Y = number of heads showing.
y
P(y)
0
1
2
¼
½
¼
Practice:
P(y) = y / 10 for y = 1, 2, 3, 4.
Valid Probability Distribution?
Practice: Computer lab has 6 computers, Let X denote the number of
computers that are in use at a particular time of day with probability
distribution:
4
Computers in use (x)
Probability P (X = x)
0
0.05
1
0.10
2
0.15
3
0.25
4
0.20
5
0.15
6
0.10
• Find the probability that the number of computers in use is:
– At most 2
– Between 2 and 5, inclusive
– Strictly between 2 and 5
• We can represent the probability mass function of a discrete random variable using
a line graph or probability histogram
5
Practice:
Toss a coin 3 times
• Find the probability distribution for the number of
heads, X, in 3 coin tosses
Let
Let
(x) be the number of heads.
(H )
represent the outcome of a Head, and
(T )
the outcome of a Tail.
The experiment is looking for the number of Heads (The random variable).
• The sample space for this experiment
lists all possible outcomes.
{HHH, HHT, HTH, HTT,
THH, THT, TTH, TTT}
6
P(X= 0) = 1/8
P(X= 1) = 3/8
P(X= 2) = 3/8
P(X= 3) = 1/8
Commulative Distribution Function ( cdf):
7
Example: Find the cumulative distribution function for the function below
8
Example:
9
the only points that receive nonzero probability are –2, 0, and 2. The probability
mass function at each point is the jump in the cumulative distribution function at the
point. Therefore
Example:
10
• The expected value of X ( Mean):
measure of center or middle of the probability distribution
Example
11
Practice:
The number of classes a student is enrolled in at a particular university
has probability distribution:
Number of
Courses (x)
1
2
3
4
5
6
7
P (X = x)
0.01
0.03
0.13
0.25
0.39
0.17
0.02
• What is the mean number of courses that a student at is enrolled in?
……………………………………………………………………………….
• Mean number of courses, µX = 4.57
• Possible values for X = {1, 2, 3, 4, 5, 6, 7}
• If we were to take the average of the number of courses for many students we could
12
expect it to be about 4.57
otherwise
• The expected value of a function of X, h(X), is given by:
E[h(X)] = ∑ h(x) · p(x)
•
D
Example:
Diagnostic test of a vehicle depends on number of cylinders (X) with cost:
h(X) = 20 + 3X + 0.5X2
• Probability distribution for number of cylinders below, find the mean cost.
Number of
cylinders (x)
4
6
8
• Mean cost = E[h(X)] =
P (X = x)
0.5
0.3
0.2
h(X)
40
56
76
(40)(.5) + (56)(.3) +(76)(.2) = 52
13
• The expected value of a linear function, h(X) = aX + b
is: E(aX + b) = aE(X) + b
Example:
• Suppose instead the diagnostic test of a vehicle depends on number of cylinders
(X) with
cost = 20 + 3X
• The mean number of cylinders is µX = E(X) = 5.4
• Mean cost = 20 + 3(5.4) = 36.2
The variance of a discrete random variable X with pmf p(x) and expected value µ:
14
An alternative (easier to use) formula for σ2:
σ2x = E[X2] − (E[X])2
Example:
• The number of classes a student is enrolled in at a particular university has
probability distribution below:
Find the expected number of classes and the standard deviation
µX = 4.57
σ2 = 1.264
σx = 1.12
X
15
The variance of a function of X, h(X), is given by:
· For a linear function h(X) = aX + b, the variance is given by:
Var(aX + b) = a2Var(X) = a2σ2
• The standard deviation of linear function is:
σ ax+b = |a| σx
Example
Suppose the diagnostic test of a vehicle depends on number of
cylinders (X) with
cost = 20 + 3X
The variance for number of cylinders Var(X) = σ2 = 2.44
16
Find variance and standard deviation for cost?
Solution:
Variance of cost =
Standard deviation of cost=
- Some probability distributions can be written in terms of a parameter. Parameter
choice
determines how the probability is distributed among the possible values of a random
variable.
- Probability distributions that differ only in the value of their parameters are said
to come from the same family
17
Summary of Rules for Expected Values and Variances
If c is a constant number,
• E(c) = c
• E(cY) = cE(Y)
If X and Y are two random variables,
• E(X + Y) = E(X) + E(Y)
And:
• var(c) = 0
• var(cY) = c2var(Y)
If X and Y are two independent random
variables, • var(X + Y) = var(X) + var(Y)
18
The Binomial Random Variable
• Many experiments have responses with 2 possibilities (Yes/No, Pass/Fail).
• Certain experiments called binomial experiments yield a type of r.v. called a
binomial random variable.
Characteristics of a binomial experiment:
(1) The experiment consists of a number (denoted n) of identical trials.
(2) There are only two possible outcomes for each trial – denoted “Success” (S)
or “Failure” (F)
(3) The probability of success (denoted p) is the same for each trial.
(Probability of failure = q = (1 – p.)
(4) The trials are independent.
Then the binomial r.v. (denoted Y) is the number of successes in the n trials.
Example 1: A factory makes 25 bricks in an hour. Suppose typically 5% of all bricks
produced are nonconforming. Let Y = total number of nonconforming bricks.
19
Example 2: A student randomly guesses answers on a multiple choice test with 3
questions, each with 4 possible answers. Y = number of correct answers.Then Y is
The Binomial Probability Distribution
• The distribution of a binomial random variable depends on two
parameters: n the number of trials
p the probability of success
Decide in each case whether X is a binomial random variable.
A coin is tossed 10 times. Let X be the number of times the coin lands heads.
This is a binomial experiment. Each toss of the coin is a trial. There are two possible
outcomes. Since X represents the number of heads, heads counts as a success. The trials are
independent.
Five basketball players each attempt a free throw. Let X be the number of free throws made.
This is not a binomial experiment. The probability of success (making a shot) differs
from player to player.
20
Example:
The Pew Research Center recently reported that approximately 30% of Internet users in
the United States use the image sharing website Pinterest. Suppose a simple random
sample of 15 Internet users is taken. Use the binomial probability distribution to find
the following probabilities.
a)
Find the probability that exactly four of the sampled people use Pinterest.
b)
Find the probability that fewer than three of the people use Pinterest.
c)
Find the probability that more than one person uses Pinterest.
d)
Find the probability that the number of people who use Pinterest is between 1 and 4,
21
inclusive.
From table: P(4)= F(4)-F(3)= 0.5155 – 0.2969= 0.219
From table: P(x<3)= F(2) = 0.1268
22
From table: P(x> 1)= 1 – P (1) = 1 - 0.035
= 0.965
23
From table: F(4) – F(0) = 0.5155 – 0.0047
= 0.511
24
Practice:
In a recent Pew poll, 10% of adults said that they consider themselves to be “gamers.”
Assume that 20 adults are randomly sampled.
a) Compute the probability that exactly three of them consider themselves to be gamers.
b)
Find the probability that at most two of them consider themselves to be gamers.
c) Find the probability that at least four of them consider themselves to be gamers.
d) Find the probability that the number who consider themselves to be gamers is between 3
and 6 inclusive.
25
• In 10 coin flips how many heads do you expect?
26
Example:
Gregor Mendel discovered the basic laws of heredity by studying pea plants. In one
experiment, he produced plants whose parent plants contained genes for both green and
yellow pods. Mendel’s theory states that the offspring of two such parents has probability
0.75 of having green pods. Assume that 80 such plants are produced.
a)
Find the expected number of plants that have green pods.
b)
Find the variance of the number of plants that have green pods.
c)
a) 60
Find the standard deviation of the number of plants that have green pods.
b) 15
c) 3.8730
27
The Poisson Probability Distribution
• The binomial was built upon conducting trials, What if there is not a fixed
number of trials ? In this case we can use the Poisson distribution.
If the random variable X has a Poisson distribution with a rate λ and time t, we
can compute probabilities using the following distribution.
For a Poisson random variable X that represents the number of events that occur
with average rate λ in a time interval of length t, the probability that x events occur is
(t )
x
P (x) = e
−t
x!
The number e is a constant whose value is approximately 2.71828.
The possible values for X are 0, 1, 2, ⋯
• Appendix Table A.2 has cumulative distribution values for the
Poisson distribution
28
Example
The number of hits on a certain website follows a Poisson distribution with λ = 3 hits per
minute. Let X be the number of hits in a 2-minute period. Find the following probabilities:
•
a)
P(5)
b)
P(less than 3)
29
Solving the previous example using TI-84 plus:
30
Practice:
The number of traps (defects) in a particular metal oxide transistor has a
Poisson distribution with λ = 2. What is the probability that there are exactly
three traps? What is the probability that there are at most three traps?
Example:
For the case of the thin copper wire, suppose that the number of flaws follows a
Poisson distribution with a mean of 2.3 flaws per millimeter.
1. Determine the probability of exactly two flaws in 1 millimeter of wire.
31
2- Determine the probability of 10 flaws in 5 millimeters of wire. Let X denote
the number of flaws in 5 millimeters of wire.
X has a Poisson distribution with λT = 2.3 flaws/mm × 5mm = 11.5 flaws
32
33
Example:
The number of hits on a website during a given time interval has a Poisson distribution.
If there are an average of three hits per minute, and X is the number of hits between 2:30
P.M. and 2:35 P.M., find λ and t.
Solution:
The average number of hits per minute is 3, so λ = 3 hits per minute. The length of
the time interval between 2:30 and 2:35 is five minutes, so t = 5 minutes.
Practice:
Pulses arrive at a counter at an average rate of 6 per minute. What is the
probability that in a 0.5-min interval at least one pulse is received?
34
Text book Recommended Questions :
3.16 , 3.17 , 3.18 , 3.25 , 3.38 , 3.39 , 3.40 , 3.51 , 3.52 , 3.57 , 3.58 , 3.65 , 3.66
3.100 , 3.101 , 3.102 , 3.106 , 3.159 , 3.160 , 3.161 , 3.164 , 3.165 , 3.166
35
Download