0% found this document useful (0 votes)
23 views45 pages

Chapter 4 Random Variables Part B (1)

Uploaded by

sadaq322q
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views45 pages

Chapter 4 Random Variables Part B (1)

Uploaded by

sadaq322q
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Probability and Statistics

for Engineers and Scientists

Chapter 4: Random Variables

Part B : Continuous Random Variable

Dr. Jamal N. Al-Abbasi


Continuous Random Variables
Consider the following table of sales,
divided into intervals of 1000 units each,
interval
(0,1000]
(1000,2000]
(2000,3000]
(3000,4000]
(4000,5000]
(5000,6000]
(6000,7000]
and the Relative Frequency of each interval.

interval relative freq.


(0,1000] 0
(1000,2000] 0.05
(2000,3000] 0.25
(3000,4000] 0.30
(4000,5000] 0.25
(5000,6000] 0.10
(6000,7000] 0.05
1.00
We’re going to divide the relative frequencies
by the width of the cells (which here is 1000).
This will make the graph have an area of 1.

relative relative freq.


interval f(x) 
freq. cell width
(0,1000] 0 0
(1000,2000] 0.05 0.00005
(2000,3000] 0.25 0.00025
(3000,4000] 0.30 0.00030
(4000,5000] 0.25 0.00025
(5000,6000] 0.10 0.00010
(6000,7000] 0.05 0.00005
Graph
f(x) = p(x)

relative freq. 0.00030


interval f(x) 
cell width 0.00025
(0,1000] 0
0.00020
(1000,2000] 0.00005
(2000,3000] 0.00025 0.00015
(3000,4000] 0.00030 0.00010
(4000,5000] 0.00025
0.00005
(5000,6000] 0.00010
0
(6000,7000] 0.00005 0 1000 2000 3000 4000 5000 6000 7000
sales

The area of each bar is the frequency of the category,


so the total area is 1.
Graph
f(x) = p(x)
relative freq. 0.00030
interval f(x) 
cell width
(0,1000] 0 0.00025

(1000,2000] 0.00005 0.00020


(2000,3000] 0.00025 0.00015
(3000,4000] 0.00030
0.00010
(4000,5000] 0.00025
(5000,6000] 0.00010 0.00005

(6000,7000] 0.00005 0
0 1000 2000 3000 4000 5000 6000 7000
sales

Here is the frequency polygon.


Graph
If we make the intervals 500 units instead of 1000, the
graph would probably look something like this:
f(x) = p(x)

The height of the


bars increases and
decreases more
gradually.

sales
Graph
If we made the intervals infinitesimally small, the bars and the
frequency polygon would become smooth, looking something like
this:

f(x) = p(x)

This what the distribution


of a continuous random
variable looks like.
This curve is denoted f(x)
or p(x) and is called the
probability density
function.

sales
pmf versus pdf

 For a discrete random variable, we had a probability mass function


(pmf).
 The pmf looked like a bunch of spikes, and probabilities were
represented by the heights of the spikes.
 For a continuous random variable, we have a probability density
function (pdf).
 The pdf looks like a curve, and probabilities are represented by areas
under the curve.
Pr(a < X < b)

f(x) = p(x)

a b sales
Hint:
A continuous random variable has an infinite
number of possible values & the probability
of any one particular value is zero.
If X is a continuous random variable,
which of the following probabilities is largest?

1. Pr(a < X < b) (Hint: This is a trick question.)


2. Pr(a ≤ X < b)
3. Pr(a < X ≤ b)
4. Pr(a ≤ X ≤ b)
(They’re all equal.)
They differ only in whether they include the individual
values a and b, and any one particular value has zero
probability!
Properties of
probability density functions (pdfs)
 1. f(x) ≥ 0 for values of x
This means that when we draw the pdf curve, while it may be on the
left side of the vertical axis (have negative values of x), it can not go
below the horizontal axis, where f would be negative.
 2. Pr( - ∞ < X < ∞) = 1
The total area under the pdf curve, which corresponds to the total
probability, is 1.
Cumulative Distribution Function for
a Continuous Random Variable


Properties of
Cumulative Distribution Function (CDF)


Rectangle Example

f(x) = 2 if 1 ≤ x ≤ 1.5 and


f(x) = 0 otherwise
This function satisfies both the properties of pdfs.
First, it’s never negative.
f(x) Second, the total area under the curve is (1/2) (2) = 1.

2.0

0 1.0 1.5 x
Rectangle Example: What is F(1.2)?

 F(1.2) = Pr(X ≤ 1.2)


 = the area under the pdf up to where x is 1.2.
f(x)

2.0

0 1.0 1.5 x
Rectangle Example: What is F(1.2)?

 F(1.2) = Pr(X ≤ 1.2)


 = the area under the pdf up to where x is 1.2.
= (0.2) (2.0)= 0.4
f(x)

2.0

0 1.0 1.2 1.5 x


Rectangle Example: What is F(x)?

f(x)

2.0
Example: What is F(x)?


Expected Values of Continuous Random
21
Variables

The mean, or expected value, of a


continuous random variable is


Variance of Continuous
22
Random Variables
 The Variance of a Continuous Random Variable X is

 The Standard Deviation of a Continuous


Variable X is
23 Example: What is Mean and
Variance?

The mean, or expected value, of a


continuous random variable is

 The Variance of a Continuous


Random Variable X is
Example

 The p.d.f. of T, the weekly CPU time (in hours) used by an accounting firm, is
given below.

0 if t  0
3 2
fT (t )   64 t (4  t ) if 0  t  4
0 if t  4

Example (cont)

 The graph of the p.d.f. is given below:

0.5

0.4

0.3

f T (t ) 0.2

0.1

0
-4 -2 0 2 4 6
-0.1
t
Example (cont)
P(1  T  2)
 is equal to the area between the graph of and the x-axis
over the interval.

0.5

0.4

0.3
f(x) 0.2

0.1

0
-4 -2 0 2 4 6
-0.1

x
Another Example

 The c.d.f. of T (for the previous example) is given below.

0 if t  0
1 3
FT (t )   256 t (16  3t ) if 0  t  4
1 if t  4

 Find

P(1  T  2)
The graph of the c.d.f.

1.2
1.0
0.8
0.6
F T (t )
0.4
0.2
0.0
-4 -2 -0.2 0 2 4 6
t
Solution

P(1  T  2)  P (T  2)  P (T  1)
 P (T  2)  P (T  1)
 FT (2)  FT (1)
1 1 3
 (23 )(16  3  2)  (1 )(16  3 1)
256 256
 0.2617
Continuous Random Variables
Example of Continuous Random Variables

 Example : Metal Cylinder Production


Suppose that the random variable X is the
diameter of a randomly chosen cylinder
manufactured by the company. Since this
random variable can take any value between
49.5 and 50.5, it is a continuous random
variable.
Probability Density Function

 Probability Density Function (p.d.f.)


Probabilistic properties of a continuous random
variable

f ( x)  0

statespace
f ( x)dx  1
Probability Density Function

 Example
Suppose that the diameter of a metal cylinder has
a p.d.f
f ( x)  1.5  6( x  50.2) 2 for 49.5  x  50.5
f ( x)  0, elsewhere

f ( x)

49.5 50.5 x
Probability Density Function

 This is a valid p.d.f.

50.5
49.5
(1.5  6( x  50.0) 2 ) dx  [1.5 x  2( x  50.0)3 ]50.5
49.5

 [1.5  50.5  2(50.5  50.0)3 ]


[1.5  49.5  2(49.5  50.0)3 ]
 75.5  74.5  1.0
Probability Density Function

 The probability that a metal cylinder has a diameter


between 49.8 and 50.1 mm can be calculated to
be 50.1
 (1.5  6( x  50.0) ) dx  [1.5 x  2( x  50.0) ]50.1
2 3
49.8
49.8

 [1.5  50.1  2(50.1  50.0) 3 ]


[1.5  49.8  2(49.8  50.0)3 ]
 75.148  74.716  0.432
f ( x)

49.5 49.8 50.1 50.5 x


Cumulative Distribution Function

 Cumulative Distribution Function

x
 F ( x)  P( X  x)   f ( y )dy


dF ( x )
 f ( x) 
dx

 P ( a  X  b)  P ( X  b)  P ( X  a )
 F (b)  F (a)

 P ( a  X  b)  P ( a  X  b)
Probability Density Function

Example

x
F ( x)  P( X  x)   (1.5  6( y  50.0) 2 )dy
49.5

 [1.5 y  2( y  50.0)3 ]49.5


x

 [1.5 x  2( x  50.0)3 ]  [1.5  49.5  2(49.5  50.0)3 ]


1.5 x  2( x  50.0)3  74.5
P(49.7  X  50.0)  F (50.0)  F (49.7)
 (1.5  50.0  2(50.0  50.0)3  74.5)
(1.5  49.7  2(49.7  50.0)3  74.5)
 0.5  0.104  0.396
Probability Density Function

P(49.7  X  50.0)  0.396


1

P( X  50.0)  0.5
F ( x)

P( X  49.7)  0.104

49.5 49.7 50.0 50.5 x


Expectations of Continuous Random
Variables
 Example (continuous random variable)
 The expected diameter of a metal cylinder is
50.5
E( X )   x(1.5  6( x  50.0) 2 )dx
49.5

 Change of variable: y=x-50

0.5
E ( x)   ( y  50)(1.5  6 y 2 )dy
0.5
0.5
 (6 y 3  300 y 2  1.5 y  75)dy
0.5

 [3 y 4 / 2  100 y 3  0.75 y 2  75 y]0.5


0.5

 [25.09375]  [24.90625]  50.0


Example
39

If the probability density function of X is

2 (1  x ) for 0 < x < 1


f ( x) 
0 elsewhere

then find

(a) m and s

(b) P(X>0.4)

(c) the value of x* for which P(X<x*)=0.90


Example
40

First, plot f(x):

1.5

f(x)
1

0.5

0
0 0.2 0.4 0.6 0.8 1
x
Solution
41

Find the mean and standard deviation of X,


1
m  E ( X )   xf ( x ) dx
0
1 1
  x  2(1  x )dx  2  [ x  x 2 ]dx
0 0
1
x 2
x   1 1
3
 2     2  
 2 3 0  2 3
2 1
 1 
3 3
Solution
42

s 2  Var ( X )  E ( X 2 )  m 2
2
1
1
  x f ( x )dx   
2

0  3
1
1
1 x x  1
3 4
  x  2(1  x )dx   2    
2

0
9  3 4 0 9
1 1 1 2 1
 2    2  
 3 4  3 12 9
Solution
43

1 2 1 1 2  1
     
3  4 3  3  12  18
and the standard deviation is

1
s  0.236
18
Solution
44

(b) x x
F ( x)  P( X  x)   f ( x) dx   2  2 x dx
0 0

 2x  x2 for 0<x<1

P(X  0.4)  1  P(X  0.4)


 1  2 * 0.4  0.4 2

 1  0.64  0.36
P( X  x*)  P( x*)  2( x*)  ( x*)2  0.9
(c)
thereforex*  0.68 or 1.32
Since 1.32>1, so x*  0.68
Assignment #4.b

4.b.1: Let X be a continuous random variable with distribution:


𝑓 𝑥 = 1, 0 ≤ 𝑥 ≤ 1.
=0 𝑜. 𝑤.
(i)Find 𝑃(0.2 ≤ 𝑋 ≤ 0.5), 𝑃(𝑋 ≤ 0.3)and 𝑃 𝑋 > 0.5 .
(ii)Determine the cumulative distribution function 𝐹 𝑥 .
(iii)Determine the Expected Value 𝐸 𝑋 & the Variance 𝑉 𝑋 of the Random Variable X.

4.b.2: Let X be a continuous random variable with distribution:


𝑓 𝑥 = 3𝑒 −3𝑥 , 𝑥 ≥ 0.
=0 𝑜. 𝑤.
Find:
(i) 𝑃(0.2 ≤ 𝑋 ≤ 0.5), 𝑃(𝑋 ≤ 1.2)and 𝑃 𝑋 > 0.8 .
(ii) Determine the cumulative distribution function 𝐹 𝑥 .
(iii) Determine the Expected Value 𝐸 𝑋 of the Random Variable X.
(iv) Determine the Variance 𝑉 𝑋 of the Random Variable X.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy