Distributions2 PPT
Distributions2 PPT
Distributions (2)
© 2008 Winton
2
2
h=
c -a
a bcx
© 2008 Winton
3
= 0 otherwise
© 2008 Winton
4
Expected Value
Distribution
rsample
• Again this means solving x= f(z)dz
-8
for rsample given a random probability x
• Since f(z) is piecewise continuous, its distribution function
F(t) is given by
0 for t = a
t
Left side
f(z)dz for a <t = b integral
t
F(t) = f(z)dz = a
c
-8 1 - f(z)dz for b =t < c Right side
integral
t
1 for t = c
© 2008 Winton
7
Sampling Function
b
(b - a)
• Since f(z)dz
= (area of left triangle)
(c - a)
a
(b - a)
if x = use the left side equation to
(c - a)
solve for rsample ; otherwise use the right side
equation
•Example: c
x
0 1
(b-a)/(c-a)
© 2008 Winton
10
V. Gamma Distribution
• Background: Gamma Function
– One of a large number of functions related to the
exponential function
– Traces from 18 th century work by Euler in which he
was using interpolation methods to define n! for non-
integral values
• dubbed the gamma function by LeGendre in a series of books
published between 1811 and 1826
– Appears naturally in the study of anti-differentiation
• Also studied in the context of differential equations when
calculating LaPlace transforms
• The gamma function is given by
8
G(a) = xa -1 e- x dx (a > 0)
0
© 2008 Winton
11
Proportionality Constant k
8 8 x 8
-
f(x)dx = 1. = k xa - 1 e ß dx = kßa ta - 1 e- t dt where x = ßt
-8 0 0
G(a)
1 1
k =f(x) is given by
so and xa e
- 1 - x/ß
ßa G(a) ßa G()
a
0.5
a=.5, ß=10
0.4
a=1.5, ß=3.3333
0.3 a=5, ß=1
a=10, ß=.5
0.2
0.1
0 x
0 5 10
© 2008 Winton
18
Corresponding Distribution
Functions and Sampling Functions
F(x)
rsample
10
1
.6
6
.2
2
0
0 10
0
0 .6 .2 1
• The gamma distribution is used to model waiting times or time to complete a task
• It can be shown that if we have exponentially distributed interarrival times with
mean 1/ , the time needed to obtain k changes distributes according to a gamma
distribution with a = k and ß = 1/
Gamma Distribution Behavior
© 2008 Winton
19
x
-
f(x) = kxa - 1 e ß
for x > 0 for fixed a > 0 and ß > 0
0 otherwise
•If
– a < 1 then x a -1 8 as x 0
– a = 1 then the distribution is the exponential distribution
– a > 1 then x a -1 0 as x 0
• The example showed three basic shapes, each of which is described by the
behavior of the derivative f '(x) (slope function) of f(x)
– f '(x) = k[(a -1)x a -2 e -x/ß + (-1/ß)x a -1 e -x/ß ]
Weibull pdf
• The choice of k=a/ß a is the basis for the pdf
a
a - 1 - x -d
a-x d ß
f(x) = e for x = d
ß ß
0 otherwise
– the effect of d is to displace the distribution d
along the horizontal axis, so it is often taken to
be 0
• With a little work, it can be shown that
– E(X) = d + ßG(1 + 1/a) and
– VAR(X) = ß 2 (G(1 + 2/a) - G 2 (1 + 1/a))
© 2008 Winton
23
Sampling
•Since
rsample rsample
e- ()()x (- d) /ß
a a
x= f(z)dz = - = 1- e- (rsample - d)/ß
d d
the sample function can be solved for rsample for given
values of a, ß, d
• The Weibull distribution is often used to model time until
failure (for example, light bulbs may have significant early
failure and some have significant long term until failure)
– When a = 1, ß = 1/ , d = 0 then the Weibull distribution is the
exponential distribution
© 2008 Winton
24
Graph
Weibull pdf for fixed ß = 1 and varying values of a
f(x)
4
a=10, ß=1
a=.5, ß=1
2
a=5, ß=1
1 a=1.5, ß=3.3333
0 x
01234