Professional Documents
Culture Documents
Lesson 0: Preliminaries
Le Thi Xuan Mai
The university of natural sciences
T.X.M. Le
Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
Suppose that in the population, the proportion of people who would respond yes to this question is , and the probability of a response of no is then 1 . Since each person is independent of all the other persons, the binomial probability can be calculated as follows P (X = 4) = 4 (the number of 4 responses is 4 ) P (X = 3) = 43 (1 ) (since there are four occurrences of three yes responses) P (X = 2) = 62 (1 )2 P (X = 1) = 4(1 )3 P (X = 0) = (1 )4
T.X.M. Le
Bayesian statistics
Common distribution
This lead us to dene a binomial random variable and calculate its probability distribution.
T.X.M. Le
Bayesian statistics
Common distribution
If Y1 binomial(n1 , ) and Y2 binomial(n2 , ) are independent, then Y = Y1 + Y2 binomial(n1 + n2 , ). When n = 1 this distribution is called the Bernoulli distribution. The binomial(n, ) model assume that Y is a sum of independent binary() random variables.
T.X.M. Le Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
A random variable Y {0, 1, . . .} has a negative binomial(r , ) distribution for any positive integer r if 0 1 and
y y r P ( y | r , ) = Cy +r 1 (1 ) .
T.X.M. Le
Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
The name negative binomial can be replaced by inverse binomial because it arises from a series of Bernoulli trials where the number of successes is xed at the outset. In this case, Y is the number of failure preceding the r th success. This distribution is sometimes used to model countably innite random variables having variance substantially larger than the mean (so that the Poisson model would be inappropriate). The geometric is the special case of the negative binomial having r = 1. It is the nuber of failures preceding the rst success in a series of Bernoulli trials.
T.X.M. Le
Bayesian statistics
Common distribution
If Y1 Poisson(1 ) and Y2 Poisson(2 ) are independent, then Y = Y1 + Y2 Poisson(1 + 2 ). If it is observed that a sample mean is very dierent than the sample variance, then the Poisson model may not be appropriate.
T.X.M. Le Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
The t distribution
A random variable Y R has a t distribution( ) if > 0, and y2 [( + 1)/2] 1 + ]( +1)/2 . p (y | ) = (/2) For this distribution, E [Y | ] Var[Y | ] mode median p (y | ) = = = = = 0 if > 1; /( 2) if > 2, Var[Y | ] = if 1 < 2; 0 0 dt(y , nu).
The parameter is referred to as the degrees of freedom and is usually taken to be a positive integer, though the distribution is proper for any positive real number . The t is a common heavy-tailed (but still symmetric and unimodal) alternative to the normal distribution.
T.X.M. Le Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
a)2
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
1 a+b +1 ;
dbeta(y , a, b ).
The beta distribution is closely related to the gamma distribution. A multivariate version of the beta distribution is the Dirichlet distribution.
T.X.M. Le Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
Var[Y |a, b ] =
a ; b2
dgamma(y , a, b ).
If Y1 gamma(a1 , b ) and Y2 gamma(a2 , b ) are independent, then Y1 + Y2 gamma(a1 + a2 , b ) and Y1 /(Y1 + Y2 ) beta(a1 , a2 ). If Y normal(0, 2 ) then Y 2 gamma(1/2, 1/2 2 ). The chi-square distribution with degrees of freedom is the same as a gamma(/2, 1/2) distribution. If Y normal(0, 1) then Y 2 chi-square(1).
T.X.M. Le Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
A random variable Y (0, ) has an inverse-gamma(a, b ) distribution if 1/Y has a gamma(a, b ) distribution. In other words, if X gamma(a, b ) and Y = 1/X , then Y inverse-gamma(a, b ). The density of Y is p (y |a, b ) = For this distribution, E [Y |a , b ] Var[Y |a, b ] = =
b a 1
mode[X |a, b ] =
Note that the inverse-gamma density is not simply the gamma density with y replaced by 1/y . The inverse-2 ( ) is a special case of the inverse-gamma distribution, with a = /2 and b = 1/2.
T.X.M. Le Bayesian statistics
Common distribution
Common distribution
EX Var (X )
= =
mode(X ) =
T.X.M. Le
Bayesian statistics
Common distribution
Exponential distributions
A random variable Y > 0 has an exponential distribution() if > 0 and p (y |) = exp(y ). For this distribution, E [Y |] Var[Y |] = 1/; = 1/2 ;
T.X.M. Le
Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
This distribution is symmetric and unimodal, but has heavier tails and a somewhat dierent shape, being strictly concave up on both sides of .
T.X.M. Le Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
The logistic is another symmetric unimodal distribution, more similar to the normal in appearance than the double exponential, but with even heavier tails.
T.X.M. Le Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
Cauchy distribution
A random variable Y R has a Cauchy distribution (, 2 ) if > 0, < < , 2 > 0 and p (y |, 2 ) = 1 2 . [1 + ( x ) ]
For this distribution, E [Y ] and Var[Y ] do not exist, though is the median of this distribution. This is a special case of the t distribution t (1, , 2 ) which has the heaviest possible tails.
T.X.M. Le
Bayesian statistics
Common distribution
T.X.M. Le
Bayesian statistics
Common distribution
mode[Y |, ] = .
T.X.M. Le
Bayesian statistics
Common distribution
If Y1 normal(1 , 1 ) and Y2 normal(2 , 2 ) are independent, then aY1 + bY2 + c normal(a1 + b 2 + c , a2 1 + b 2 2 ). If Z is the vector with elements Z1 , . . . , Zp i.i.d. normal(0, 1) then Y = + AZ multivariate normal(, ), where and AAT = (A is the Choleski factorization of ). The following R-code will generate an n p matrix such that the rows are i.i.d samples from a multivariate normal distribution: Z Y = matrix(rnorm(n p ), nrow = n, ncol = p ) = t (t (Z % %chol(Sigma)) + c (theta)).
T.X.M. Le
Bayesian statistics
Common distribution
p (/2) =
p (p 1)/4 j =1
[( + 1 j )/2], and aj ,j ).
= (mi2,j + mi ,i mj ,j );
mode[Y |, M ] = ( p 1)M .
T.X.M. Le Bayesian statistics
Common distribution
i =1
T.X.M. Le
Bayesian statistics
Common distribution
A random p p symmetric positive denite matrix Y has an inverse-Wishart(, M ) distribution if X 1 has a Wishart(, M ) distribution. In other words, if X Wishart(, M ) and X = Y 1 , then Y inverse-Wishart(, M ). The density of Y is p (Y |, M ) =[2 p/2 p (/2)|M |/2 ]1 |Y |( +p+1)/2 exp{tr (M 1 Y 1 /2)}. For this distribution, E [Y |, M ] = ( p 1)1 M 1 ;
mode[Y |, M ] = ( + p + 1)1 M 1 . If inverse-Wishart(, S 1 ), we have mode[Y |, S ] = ( + p + 1)1 S . If 0 were the most probable value of a priori, then we could set S = (0 + p + 1)0 , so that inverse-Wishart(, [( + p 1)0 ]1 ) and mode[|, S ] = 0 .
T.X.M. Le Bayesian statistics