• Study Resource
• Explore

# Download Continuous Random Variables

Survey
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

Central limit theorem wikipedia, lookup

Transcript
```CPSC 531
Systems Modeling and Simulation
Continuous Random
Variables
Dr. Anirban Mahanti
Department of Computer Science
University of Calgary
mahanti@cpsc.ucalgary.ca
Definitions
• A random variable X is said to be continuous if
there exists a non-negative function f(x),
∀x∈(−∞,∞), with the property that for any set A
of real numbers:
P({ X ∈ A}) = ∫ f ( x)dx
A
• f(x) is called the “probability density function”
(PDF) of X
Continuous Random Variable
2
Properties of PDF
f ( x) ≥ 0, ∀x
∞
∫ f ( x )dx = 1
−∞
i.e., area under the curve equals one.
b
P ({a ≤ X ≤ b}) = ∫ f ( x)dx
a
i.e., B = [a, b]
and we want to find
P{ X ∈ B}.
Continuous Random Variable
3
1
Properties of PDF (continued)
Continuous distributions assign 0 value to individual values :
a
P ({ X = a}) = ∫ f ( x)dx = 0
a
Consequence of the above property :
P({a ≤ X ≤ b})
= P ({a < X < b})
= P ({a ≤ X < b})
= P ({a < X ≤ b})
Continuous Random Variable
4
Cumulative Distribution Function
• The CDF FX(⋅) of a continuous random
variable X with PDF fX(⋅) can be obtained as
follows:
FX ( x) = P({ X ∈ (−∞, x]})
x
= ∫ f X (t ) dt
−∞
Continuous Random Variable
5
CDF - PDF Relationship
• The PDF can be obtained from the CDF and
vice versa:
FX' ( x) =
dFX ( x)
= f X ( x)
dx
• Distribution of a continuous random variable
can be represented using either the PDF or the
CDF.
Continuous Random Variable
6
2
The Uniform Distribution
• A random variable X is said to be uniformly
distributed on the interval [a, b], a < b, if the
probability of selecting a point along the interval
[a, b] is equally likely at all portions of the
interval.
• We can say that the probability that X will belong
to a particular sub-interval of [a, b] is
proportional to the length of that sub-interval.
Continuous Random Variable
7
PDF and CDF of Uniform R.V.
• The CDF of X is:
• The PDF of a uniform
random variable X in
the interval [a, b] is:
⎧0, x ≤ a
⎪x−a
⎪
F ( x) = ⎨
,a< x<b
⎪b − a
⎪⎩1, x ≥ b
⎧ 1
, a< x<b
⎪
f ( x) = ⎨b − a
⎪⎩0, otherwise
How did we get F(x)?
x
F ( a < x < b) =
x
dt
dt
x−a
=∫
=
b
−
a
b
−
a
b
−a
−∞
a
∫
Continuous Random Variable
8
Uniform R.V. PDF and CDF
PDF of Uniform R.V. (a=1, b=3)
CDF of Uniform R.V. (a=1, b=3)
1
1
f(x) 0.5
F(x)
0
0.5
0
0
1
2
3
4
0
x
1
2
3
4
x
Continuous Random Variable
9
3
Exponential Distribution
• A continuous random variable X is exponentially
distributed with parameter β if it has the following PDF:
⎧⎪β e − β x , x ≥ 0
f X ( x) = ⎨
⎪⎩ 0,
otherwise
• The CDF for the exponential distribution is:
x<0
⎧⎪ 0,
FX ( x) = ⎨
−β x
⎪⎩1 − e
, x≥0
Continuous Random Variable
10
Exponential Models
• This distribution has been used to model:
• Inter-arrival times between IP packets
• Inter-arrival times between calls at a call
centre
• Inter-arrival times between web sessions from
a web client
• Service time distributions
• Lifetime of products
• Widely used in queuing theory
Continuous Random Variable
11
Exponential PDF and CDF
CDF of Exponential Distribution
PDF of Exponential Distribution
1
4
β=0.5
β=1.0
3
β=2.0
β=4.0
f(x) 2
0.8
0.6
F(x)
0.4
1
0.2
0
0
β=2.0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5
x
x
Continuous Random Variable
12
4
Memory-less Property of
Exponential Distribution
• Suppose inter-arrival times of IP packets are
modelled using Exponential distribution. The
memory-less property states that the distribution
of the expected time to a packet arrival is
independent of the duration there have been no
packet arrivals
• Suppose X is an exponentially distributed r.v.
and X ≥ t (i.e., no arrivals for time t or less).
Then,
P({ X ≥ t+h | X ≥ t }) = P({ X ≥ h })
Continuous Random Variable
13
Memory-less Property of
Exponential Distribution (cont.)
• Regardless of the duration of no packet arrivals, the
probability that an arrival will occur in the next h time
units remains the same.
P({ X ≥ t + h | X ≥ t}) =
=
1 − [1 − e − β (t + h ) ]
1 − [1 − e − β t ]
= P({ X ≥ h})
P({ X ≥ t + h})
P({ X ≥ t})
= e−β h
• Exponential distributions are the only continuous
distributions with the memory-less property.
Continuous Random Variable
14
Normal Distribution
• X is a normal random variable with mean μ and variance
σ2 if X has the following PDF:
−( x − μ ) 2
1
f X ( x) =
2π σ
e
2σ 2
, −∞ < x < ∞
• The CDF of a normal distribution is:
1
FX ( x) = P ({ X ≤ x}) =
2π σ
x
∫e
− (t − μ ) 2
2σ 2
dt
−∞
• There is no closed form for FX(x).
Continuous Random Variable
15
5
PDF of Normal Distribution
PDF of Normal Distribution (μ = 0)
1
0.8
σ=1
σ=0.5
0.6
σ=2
f(x)
0.4
0.2
0
-6
-5 -4
-3 -2
-1
0
1
2
3
4
5
6
x
This PDF has a “bell” shape with “peak” at x=0.
Continuous Random Variable
16
Why is Normal Distribution Important?
• Appropriate or useful for modelling many realworld phenomena
• IQs of randomly selected people
• Height of people selected from a homogeneous
population
• Mathematical convenience: many statistical
analysis methods assume a normal distribution
• Central Limit Theorem: The sample mean of a
large, random sample from any distribution with
finite variance will be approximately normally
distributed.
Continuous Random Variable
17
More on Normal Distribution
• Terminology: also called the “Gaussian”
distribution, after German mathematician and
scientist Carl Friedrich Gauss (1777-1855)
• In a normal distribution
• 68% of the values are within 1 standard deviation of
the mean
• Approximately 95% of the values are within 2
standard deviations of the mean
• Approximately 99% of the values are within 3
standard deviations of the mean
Continuous Random Variable
18
6
Even more on Normal Distribution
• If X is normally distributed with parameters μ
and σ2, then
Z=
(X − μ)
σ
is normally distributed with parameters 0 and 1.
Z is called the
“standard normal distribution”.
Continuous Random Variable
19
Computing CDF of Normal Distribution
• Normal distribution has no closed form for F(x).
How to compute P({a < X < b})?
• Transform X to standard normal distribution Z and
use tables
•
If X ~ N ( μ , σ 2 ) then Z =
( X − μ)
σ
is N (0,1)
Continuous Random Variable
20
Omnipresence of Normal Distribution!
• Normal distribution is everywhere, even on a bank note.
Continuous Random Variable
21
7
```
Related documents