Sei sulla pagina 1di 55

Uniform Random Variables: pdf

• We want to define a random variable X that is “equally


likely” to take on any value in some finite interval (a,b).
Formally this is nonsensical since the probability of a
continuous random variable assuming a particular value
is always 0. A better way of formalizing our intuition is
that the probability of X falling in a subinterval of (a,b)
should depend only on the length of the subinterval, not
on its location within (a,b).
Uniform Random Variables: pdf
• The random variable X that satisfies this condition is the
uniform random variable. We write X~uniform(a,b). It
has the probability density function
 , for a  x  b
1
ba
f ( x)  
 0, otherwise
• The graph of the pdf satisfies our intuition about “equal
likelihood” of all intervals of a given length within (a,b). It
also clearly has total area 1 under the pdf curve.
1/(b-a)

Area = 1

a b
Uniform Random Variables: cdf
• The cumulative distribution function F given below is
easy to compute either by integration of the pdf or by
finding the area of rectangles. Note that it has all the
usual properties of a cdf: 0 to the left, 1 to the right,
increasing and continuous in between.
 0, if x  a
 xa
F ( x)   b  a , if a  x  b
 1, if x  b

1

a b
Uniform Random Variables: cdf
• If we want to find the probability P(c<X<d) where
a<c<d<b, then we can integrate formally, but it is easier
to note that the probability is simply the ratio of the
length of (c,d) to the length of (a,b).
1/(b-a)

Area =
(d-c)/(a-b)

c d
a b
Uniform Random Variables: Expectation
• Intuitively we anticipate E(X)=(a+b)/2, the midpoint of
the interval. This turns out to be correct.
– If X~uniform(a,b) we calculate


E ( X )   xf ( x)dx 

b
b 1 1 b 2
 a 2

 xdx  x 
2
a ba 2(b  a ) a 2(b  a )
(b  a )(b  a ) b  a
 
2(b  a ) 2
Uniform Random Variables: Variance
• Let X~uniform(a,b). We can find the variance of X
using the shortcut formula Var ( X )  E ( X )   . We
2 2

proceed as follows.
b
b 1 2 x 3
b3  a 3
E( X 2 )   x dx  
a ba 3(b  a ) a 3(b  a)
b 2  ab  a 2

3
Uniform Random Variables: Variance
• Finally,

b  ab  a (a  b)
2 2 2
E( X )   
2 2

3 4
4b  4ab  4a 3b  6ab  3a
2 2 2 2
 
12 12
b  2ab  a
2 2
(b  a ) 2
 
12 12
Uniform Random Variables: Application
• Uniform random variables are the correct model for
choosing a number “at random” from an interval. They
are also natural choices for experiments in which some
event is “equally likely” to happen at any time or place
within some interval.
Uniform Random Variables: Example
• Examples of probabilities involving uniform random
variables are generally trivial. For instance, suppose you
are trying to find a short in a 3m length of wire.
Supposing you have no reason to suspect one part of the
wire over another, what is the probability you find the
short in the last half-meter of the wire? Answer: 1/6.
You can find this by integration or by the cdf, just as
you can hunt squirrels with a bazooka: Doing it once to
illustrate the concept may be justifiable, but your
motives become suspect if you do it more often.
Uniform Random Variables: Warnings
• There is no uniform distribution on an infinite interval.
In particular there is no uniform distribution on the real
line. Consequently there is no way to pick a real number
(“any real number”) at random, making all choices
“equally likely.”
• Functions of uniform random variables may not be
uniform. For instance, if X~uniform(0,1), and Y is the
square of X, then Y is a non-uniform random variable.
Let us find its cdf and thereby its pdf.
Exponential Random Variables: Pdf
• Let  be a positive real number. We write
X~exponential() and say that X is an exponential
random variable with parameter  if the pdf of X is

 e   x , if x  0
f ( x)  
 0, otherwise

11/5/2003 Probability and Statistics for 11


Teachers, Math 507, Lecture 10
Exponential Random Variables: Pdf
• A look at the graph of the pdf is informative. Here is a
graph produced by Maple for =0.5. Note that it has the
same shape as every exponential graph with negative
exponent (exponential decay). The tail shrinks to 0
quickly enough to make the area under the curve equal
1. Later we will see that the expected value of an
exponential random variable is 1/ (in this case 2). That
is the balance point of the lamina with shape defined by
the pdf. (graph on next slide)

11/5/2003 Probability and Statistics for 12


Teachers, Math 507, Lecture 10
Exponential Random Variables: Pdf

11/5/2003 Probability and Statistics for 13


Teachers, Math 507, Lecture 10
Exponential Random Variables: Pdf
• A simple integration shows that the area under f is 1:

 t
 x t
 dx  lim   e
 x  x
e dx  lim e
 t  0 t  0

 lim  e  t
  e  0
  0  1  1
t 

11/5/2003 Probability and Statistics for 14


Teachers, Math 507, Lecture 10
Exponential Random Variables: Cdf
• Essentially the same computation as above shows that .
Here is the graph of the cdf for X~exponential(0.5).

11/5/2003 Probability and Statistics for 15


Teachers, Math 507, Lecture 10
Exponential Random Variables: Cdf
• As the coming examples will show, this formula greatly
facilitates finding exponential probabilities.

11/5/2003 Probability and Statistics for 16


Teachers, Math 507, Lecture 10
Exponential Random Variables:Expectation
• Finding the expected value of X~exponential() is not
hard as long as we remember how to integrate by parts.
Recall that you can derive the integration by parts
formula by differentiating a product of functions by the
product rule, integrating both sides of the equation, and
then rearranging algebraically. Thus integration by parts
is the product rule used backwards and sideways.

11/5/2003 Probability and Statistics for 17


Teachers, Math 507, Lecture 10
Exponential Random Variables:Expectation
• Given functions u and v, Dxuv  uDx v  vDxu.
Integrate both sides wrt x to get uv   udv   vdu.

Rearrange to get  udv  uv   vdu.


In practice we look for u and dv in our original integral
and convert to the RHS of the equation to see if that is easier.

11/5/2003 Probability and Statistics for 18


Teachers, Math 507, Lecture 10
Exponential Random Variables:Expectation
• So, if X~exponential(), then
 t
E ( X )   x e   x dx  lim  x e   x dx. Let u  x and dv   e   x dx.
t 
0 0

 t

Then du  dx and v  e . So E ( x)  lim  uv 0   vdu 
 x t

t 
 0 
  x t t  x    t  1  x t  
 lim  xe   e dx   lim  te  0   e  
t  
t 

0
0     0
 1 1   1 1
 lim  te  t   e  t  e   0    lim  te  t  e  t  
t 
     t    
1 1
 00 
 
11/5/2003 Probability and Statistics for 19
Teachers, Math 507, Lecture 10
Exponential Random Variables:Variance
1
• By a similar computation Var ( X )  .
 2

11/5/2003 Probability and Statistics for 20


Teachers, Math 507, Lecture 10
Exponential Random Variables:Applications
• Exponential distributions are sometimes used to model
waiting times or lifetimes. That is, they model the time
until some event happens or something quits working.
Of course mathematics cannot tell us that exponentials
are right to describe such situation. That conclusion
depends on finding data from such real-world situations
and fitting it to an exponential distribution.
.

11/5/2003 Probability and Statistics for 21


Teachers, Math 507, Lecture 10
Exponential Random Variables:Applications
• Suppose the wait time X for service at the post office
has an exponential distribution with mean 3 minutes. If
you enter the post office immediately behind another
customer, what is the probability you wait over 5
minutes? Since E(X)=1/=3 minutes, then =1/3, so
X~exponential(1/3). We want .

P( X  5)  1  P( X  5)  1  F (5)
  5 
1

5
 1  1  e 3   e 3  0.189
 
11/5/2003 Probability and Statistics for 22
Teachers, Math 507, Lecture 10
Exponential Random Variables:Applications
• Under the same conditions, what is the probability of
waiting between 2 and 4 minutes? Here we calculate
.
   
4
 
2
P(2  X  4)  F (4)  F (2)  1  e 3   1  e 3 
   
2 4
 
e 3
e 3
 0.250

11/5/2003 Probability and Statistics for 23


Teachers, Math 507, Lecture 10
Exponential Random Variables:Applications
• The trick in the previous example of calculating

P(a  X  b)  F (b)  F (a )
is quite common. It is the reason the cdf is so useful in
computing probabilities of continuous random variables.
.

11/5/2003 Probability and Statistics for 24


Teachers, Math 507, Lecture 10
Exponential Random Variables:The Memoryless Property

• The exponential random variable has an astonishing


property. If X~exponential() represents a waiting time,
then the probability of waiting a given length of time is
not affected by how long you have waited already. That
is, P( X  a  b | X  a )  P ( X  b) . That is, if you
have already waited a minutes, the probability you wait
b more minutes is the same as your initial probability of
waiting b minutes. This is known as the memoryless
property. .

11/5/2003 Probability and Statistics for 25


Teachers, Math 507, Lecture 10
Exponential Random Variables:The Memoryless Property

• Suppose you enter the post office and have to choose


one of two lines, each of which has exactly one person
ahead of you. The person in the first line got there just
ahead of you. The person in the second line has already
been there 10 minutes. Which line should you get in so
as to be served fastest? If the waiting times are
exponential, it does not matter. Similarly, if you are
waiting for someone to get off a pay phone and you
want to calculate the probability you have to wait more
than 5 minutes, it is irrelevant to your calculations to
know how long the person has already been on the
phone.
11/5/2003 Probability and Statistics for 26
Teachers, Math 507, Lecture 10
Exponential Random Variables:The Memoryless Property

• In this respect exponential random variables behave like


geometric ones. If you are finding the probability that,
starting now, you flip a coin four times before getting
heads, it is irrelevant to know how many times the coin
flipped tails beforehand.

11/5/2003 Probability and Statistics for 27


Teachers, Math 507, Lecture 10
Exponential Random Variables:The Poisson Connection

• Suppose that X is a Poisson random variable measuring


the number of events of some sort that happen per unit
time, and suppose the mean is , so that X~Poisson().
Now let Y be the time you wait until the next Poisson
event. Let us find the cdf of Y.

• Clearly F(y)=0 if y is negative.

11/5/2003 Probability and Statistics for 28


Teachers, Math 507, Lecture 10
Exponential Random Variables:The Poisson Connection

• Now suppose y is nonnegative. Then


F ( y )  P (Y  y )  1  P (Y  y )

which is the probability of having 0 Poisson events over


the interval [0,y]. The number of events over [0,y] is
Poisson(y), so the probability of 0 events over [0,y] is
( y ) 0   y
e  e  y
0!  y
Thus F ( y )  1  e , which is precisely the cdf for
an exponential random variable with parameter .

11/5/2003 Probability and Statistics for 29


Teachers, Math 507, Lecture 10
Review
Binomial Probability Distribution
1. The procedure must have fixed number of trials.
2. The trials must be independent.
3. Each trial must have all outcomes classified into two
categories.
4. The probability of success remains the same in all trials.

Solve by binomial probability formula, Table A-1, or


technology.

Slide 32
Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley.
Approximation of a Binomial Distribution
with a Normal Distribution
np  5
nq  5

then µ = np and  = npq


and the random variable has

a distribution.
(normal)

Slide 33
Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley.
Procedure for Using a Normal Distribution
to Approximate a Binomial Distribution
1. Establish that the normal distribution is a suitable
approximation to the binomial distribution by verifying np
 5 and nq  5.

2. Find the values of the parameters µ and  by calculating


µ = np and  = npq.

3. Identify the discrete value of x (the number of successes).


Change the discrete value x by replacing it with the
interval from x – 0.5 to x + 0.5. (See continuity
corrections discussion later in this section.) Draw a
normal curve and enter the values of µ , , and either x –
0.5 or x + 0.5, as appropriate.
Slide 34
Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley.
Procedure for Using a Normal Distribution
to Approximate a Binomial Distribution -
cont
4. Change x by replacing it with x – 0.5 or x + 0.5, as
appropriate.

5. Using x – 0.5 or x + 0.5 (as appropriate) in place of x,


find the area corresponding to the desired probability
by first finding the z score and finding the area to the
left of the adjusted value of x.

Slide 35
Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley.
Example – Number of Men Among
Passengers
Finding the Probability of
“At Least 122 Men” Among 213 Passengers

Figure 6-21
Slide 36
Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley.
Definition
When we use the normal distribution (which is
a continuous probability distribution) as an
approximation to the binomial distribution
(which is discrete), a continuity correction is
made to a discrete whole number x in the
binomial distribution by representing the
single value x by the interval from
x – 0.5 to x + 0.5
(that is, adding and subtracting 0.5).

Slide 37
Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley.
Procedure for Continuity Corrections
1. When using the normal distribution as an
approximation to the binomial distribution, always use
the continuity correction.

2. In using the continuity correction, first identify the


discrete whole number x that is relevant to the
binomial probability problem.

3. Draw a normal distribution centered about µ, then


draw a vertical strip area centered over x . Mark the
left side of the strip with the number x – 0.5, and mark
the right side with x + 0.5. For x = 122, draw a strip
from 121.5 to 122.5. Consider the area of the strip to
represent the probability of discrete whole number x.
Slide 38
Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley.
Procedure for Continuity
Corrections - cont

4. Now determine whether the value of x itself should be


included in the probability you want. Next, determine
whether you want the probability of at least x, at most
x, more than x, fewer than x, or exactly x. Shade the
area to the right or left of the strip, as appropriate;
also shade the interior of the strip itself if and only if x
itself is to be included. The total shaded region
corresponds to the probability being sought.

Slide 39
Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley.
Figure 6-22
x = at least 122
(includes 122 and above)

x = more than 122


(doesn’t include 122)

x = at most 122
(includes 122 and below)

x = fewer than 122


(doesn’t include 122)

x = exactly 122
Slide 40
Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley.
LESSON 8 - 2

Geometric Probability Distribution


VOCABULARY
• Geometric Setting – random variable meets geometric conditions

• Trial – each repetition of an experiment

• Success – one assigned result of a geometric experiment

• Failure – the other result of a geometric experiment

• PDF – probability distribution function; assigns a probability to each


value of X

• CDF – cumulative (probability) distribution function; assigns the sum of


probabilities less than or equal to X
GEOMETRIC PROBABILITY
CRITERIA
An experiment is said to be a geometric experiment provided:
1.Each repetition is called a trial.

2.For each trial there are two mutually exclusive (disjoint)


outcomes: success or failure

3.The trials are independent

4.The probability of success is the same for each trial of the


experiment

5.We repeat the trials until we get a success


GEOMETRIC NOTATION
When we studied the Binomial distribution, we were only
interested in the probability for a success or a failure to
happen. The geometric distribution addresses the number of
trials necessary before the first success. If the trials are
repeated k  times until the first success, we will have had k  –
1 failures. If p  is the probability for a success and q  (1 – p)
the probability for a failure, the probability for the first
success to occur at the kth  trial will be (where x = k)
 

P(x) = p(1 – p)x-1, x = 1, 2, 3, …


 

The probability that more than n trials are needed before the
first success will be
P(k > n) = qn = (1 – p)n
GEOMETRIC PDF
The geometric distribution addresses the number of trials
necessary before the first success. If the trials are repeated k
 times until the first success, we will have had k  – 1 failures.
If p  is the probability for a success and q = (1 – p) the
probability for a failure, the probability for the first success
to occur at the kth  trial will be (where x = k)
 

P(x) = p(1 – p)x-1, x = 1, 2, 3, …

even though the geometric distribution is considered discrete,


the x values can theoretically go to infinity
 
TI-83/84 GEOMETRIC SUPPORT

• For P(X = k) using the calculator: 2nd VARS


geometpdf(p,k)

• For P(k ≤ X) using the calculator: 2nd VARS


geometcdf(p,k)

• For P(X > k) use 1 – P(k ≤ X) or (1- p)k


GEOMETRIC PDF MEAN AND STD
DEV
Geometric experiment with probability of success p has
Mean μx = 1/p

Standard Deviation σx = √(1-p)/p


EXAMPLES OF GEOMETRIC PDF
• First car arriving at a service station that needs brake work

• Flipping a coin until the first tail is observed

• First plane arriving at an airport that needs repair

• Number of house showings before a sale is concluded

• Length of time(in days) between sales of a large computer


system
EXAMPLE 1
The drilling records for an oil company suggest that the probability the
company will hit oil in productive quantities at a certain offshore location is
0.2 . Suppose the company plans to drill a series of wells.
  P(X) = 0.2
a) What is the probability that the 4th well drilled will be
productive (or the first success by the 4th)?

P(x=4) = p(1 – p)x-1 = (0.2)(0.8)4-1 = (0.2)(0.8)³ = 0.1024

P(x ≤ 4) = P(1) + P(2) + P(3) + P(4) = 0.5904


  
b) What is the probability that the 7th well drilled is productive (or
the first success by the 7th)?
   P(x=7) = p(1 – p)x-1 = (0.2)(0.8)7-1 = (0.2)(0.8)6 = 0.05243

P(x ≤ 7) = P(1) + P(2) + … + P(6) + P(7) = 0.79028


EXAMPLE 1 CONT
The drilling records for an oil company suggest that the probability the
company will hit oil in productive quantities at a certain offshore location is
0.2 . Suppose the company plans to drill a series of wells.
  P(X) = 0.2 P(x) = p(1 – p)x-1
c) Is it likely that x could be as large as 15?

P(x=15) = p(1 – p)x-1 = (0.2)(0.8)15-1 = (0.2)(0.8)14 = 0.008796

P(x ≥ 15) = 1 - P(x ≤ 14) = 1 - 0.95602 = 0.04398

d) Find the mean and standard deviation of the number of wells


that must be drilled before the company hits its first productive well.

Mean: μx = 1/p = 1/0.2 = 5 (drills before a success)

Standard Deviation : σx = (√1-p)/p) = (.8)/(.2) = 4 = 2


EXAMPLE 2
An insurance company expects its salespersons to achieve minimum
monthly sales of $50,000. Suppose that the probability that a particular
salesperson sells $50,000 of insurance in any given month is .84. If the
sales in any one-month period are independent of the sales in any other,
what is the probability that exactly three months will elapse before the
salesperson reaches the acceptable minimum monthly goal?

P(X) = 0.84 P(x) = p(1 – p)x-1

P(x=3) = p(1 – p)x-1 = (0.84)(0.16)3-1 = (0.84)(0.16)2 = 0.0215


EXAMPLE 3
An automobile assembly plant produces sheet metal door panels. Each panel
moves on an assembly line. As the panel passes a robot, a mechanical arm
will perform spot welding at different locations. Each location has a magnetic
dot painted where the weld is to be made. The robot is programmed to locate
the dot and perform the weld. However, experience shows that the robot is
only 85% successful at locating the dot. If it cannot locate the dot, it is
programmed to try again. The robot will keep trying until it finds the dot or
the panel moves out of range.
 
P(x)first
a) What is the probability that the robot's = p(1 – p)x-1will be on
success
P(X) = 0.85
attempts n = 1, 2, or 3?
 
  P(x=1) = p(1 – p)x-1 = (0.85)(0.15)1-1 = (0.85)(0.15)0 = 0.85

P(x=2) = p(1 – p)x-1 = (0.85)(0.15)2-1 = (0.85)(0.15)1 = 0.1275

P(x=3) = p(1 – p)x-1 = (0.85)(0.15)3-1 = (0.85)(0.15)2 = 0.019125


EXAMPLE 3 CONT
An automobile assembly plant produces sheet metal door panels. Each
panel moves on an assembly line. As the panel passes a robot, a
mechanical arm will perform spot welding at different locations. Each
location has a magnetic dot painted where the weld is to be made. The
robot is programmed to locate the dot and perform the weld. However,
experience shows that the robot is only 85% successful at locating the dot.
If it cannot locate the dot, it is programmed to try again. The robot will
keep trying until it finds the dot or the panel moves out of range.

b) The assembly line moves so fast that the robot only has a
maximum of three chances before the door panel is out of reach. What is
the probability that the robot is successful in completing the weld before
the panel is out of reach?

P(x=1, 2, or 3) = P(1) + P(2) + P(3) = 0.996625


EXAMPLE 4
In our experiment we roll a die until we get a 3 on it.

a) What is the average number of times we will have to roll it until we


get a 3?

μx = 1/p = 1/(1/6) = 6
SUMMARY AND HOMEWORK
• Summary
• Probability of first success
• Geometric Experiments have 4 slightly different criteria
than Binomial
• E(X) = 1/p and V(X) = (1-p)/p
• Calculator has pdf and cdf functions

• Homework
• Pg. 543 8.41, 8.43, pg. 550 8.48-49

Potrebbero piacerti anche