Anda di halaman 1dari 17

程式設計與統計軟體報


伽瑪分配
(The Gamma Probability
Distribution)

金融二 徐以軒
金融二 楊士鴻
The Gamma Probability Distr
ibution
 A random variable Y is said to have a gamma dis
tribution with parameters α>0 and β>0 if an
d only if the density function of Y is
Gamma Function
Mean and Variance
Mean and Variance

shape=α 表形狀參數 ;scale=s=β 表尺度參數


Gamma Density Functions,
β=1
R Command
op=par(mfrow=c(2,2)) 用來合併多個圖表成為一張圖

curve(dgamma(x, 1,1), 0, 10)

curve(dgamma(x, 2,1), 0, 10)

curve(dgamma(x, 3,1), 0, 10)

curve(dgamma(x, 4,1), 0, 10)


Gamma Density Functions,
α=1
R Command
op=par(mfrow=c(2,2))

curve(dgamma(x, 1,1), 0, 10)

curve(dgamma(x, 1,2), 0, 10)

curve(dgamma(x, 1,3), 0, 10)

curve(dgamma(x, 1,4), 0, 10)


Chi-Square Distribution
 Let v be a positive integer. A random variable
Y is said to have a chi-square distribution w
ith v degrees of freedom if and only if Y is a
gamma-distributed random variable with paramete
rs α=v/2 and β=2
Exponential Distribution
 A random variable Y is said to have an exponen
tial distribution with parameter β>0, α=1
if only if the density function of Y is
In R Language
In R Language
Example
The magnitude of earthquakes recorded in a region
of Norh America can be modeled as having an expon
etial distribution with mean 2.4, as measured on
the Richter scale. Find the probability that an e
arthquake striking the region will

(a) exceed 3.0 on the Richter scale

(b) fall between 2.0 and 3.0 on the Richter scale


Answer for Example
(a)

1-pgamma(3,1,1/2.4)

(b)

1-pgamma(2,1,1/2.4)-(1-pgamma(3,1,1/2.4))
References
 陳景祥 (2014) 。《 R 軟體應用統計方法 》 。東華

 http://en.wikipedia.org/wiki/Gamma_distribution
#Characterization_using_shape_k_and_scale_.
CE.B8 (Wikipedia)

 http://ccckmit.wikidot.com/st:gamma ( 陳鍾誠 )

 http://stat.ethz.ch/R-manual/R-patched/library/
stats/html/
GammaDist.html ( R Language )

 Dennis D. Wacherly, William Mendehall III, Rich


ard L. Scheaffer, Mathematical Staticstics with
Applications.
Practice
The operator of a pumping station has observed th
at demand for water during early afternoon hours
an approximately exponential distribution with me
an 100 cfs(cubic feet per second).

(a) Find the probability that the demand will exc


eed 200 cfs during the early afternoon on a rando
mly selected day

(b) What water-pumping capacity should the statio


n maintain during early afternoon so that the pro
bability that demand will exceed capacity on a ra
ndomly selected day is only .01?

Anda mungkin juga menyukai