My Math Forum (http://mymathforum.com/math-forums.php)
-   Probability and Statistics (http://mymathforum.com/probability-statistics/)
-   -   Baysian econometrics (http://mymathforum.com/probability-statistics/339618-baysian-econometrics.html)

 canfly March 21st, 2017 04:05 PM

I use the Bayes formula:

1) π(λ/x)= f(x|λ)*π(λ) / f(x) and i find π(λ/x)=exp(-x) for x positive

2) but for the second question, i find the same distribution function, does it correct? I think something is wrong with my calcul.

 canfly March 22nd, 2017 03:02 PM

Thanks again for your help, for the next exercisE, we have

Consider the density f(x|λ) = 1/λ*exp(−x) for x ≥ 0.

1) If the prior for λ ≥ 1 is uninformative i.e. π(λ) ∝ 1 what is the
posterior ? Is it proper ?
2) If the prior for λ ≥ 1 is π(λ) ∝ λ^(−2) what is the posterior ? Is it
proper ? Does it admit an expectation ? Does it admit a variance ?

 romsek March 22nd, 2017 07:45 PM

Quote:
 Originally Posted by canfly (Post 564953) I use the Bayes formula: 1) π(λ/x)= f(x|λ)*π(λ) / f(x) and i find π(λ/x)=exp(-x) for x positive 2) but for the second question, i find the same distribution function, does it correct? I think something is wrong with my calcul.
I don't believe you've done (1) correctly.

How did you find $f(x)$ and what did you get for it?

Also are you sure the conditional distribution isn't

$f(x|\lambda) = \dfrac{e^{-\lambda x}}{\lambda}$ ?

 canfly March 23rd, 2017 06:08 AM

Quote:
 Originally Posted by romsek (Post 565090) I don't believe you've done (1) correctly. How did you find $f(x)$ and what did you get for it? Also are you sure the conditional distribution isn't $f(x|\lambda) = \dfrac{e^{-\lambda x}}{\lambda}$ ?
To compute $f(x)$( marginal distribution), I use the integral of f(x|\lambda)*the prior distribution. So I integer from 0 to + infini, (1/lambda)*e^{-\lambda x} dx and i get 1/lambda. If i replace it in the baysian formula, i will get exp(-x) for x positive.
For your question, i will ask my supervisor, may be you are right, you seem to be a very high expert in this field :)

it's will look like to the poisson distribution or the exponential distribution if we put the lambda.

 romsek March 23rd, 2017 11:50 AM

Quote:
 Originally Posted by canfly (Post 565127) To compute $f(x)$( marginal distribution), I use the integral of f(x|\lambda)*the prior distribution. So I integer from 0 to + infini, (1/lambda)*e^{-\lambda x} dx and i get 1/lambda. If i replace it in the baysian formula, i will get exp(-x) for x positive. For your question, i will ask my supervisor, may be you are right, you seem to be a very high expert in this field :) it's will look like to the poisson distribution or the exponential distribution if we put the lambda.
this is what I get..

First off we have to assume some prior on $\lambda$

The problem specifies it's a uniform distribution and that $\lambda\geq 1$

so we'll let $\pi(\lambda) = \dfrac{1}{\alpha}, \lambda \in [1,1+\alpha],~\alpha>0$

$f_X(x) = \displaystyle \int_1^{1+\alpha}~\dfrac 1 \alpha \dfrac{e^{-x}}{\lambda}~d \lambda = \dfrac{e^{-x}\ln(1+\alpha)}{\alpha}$

$f_{\lambda|X}(x) = \dfrac{\dfrac{e^{-x}}{\lambda}\dfrac{1}{\alpha}}{\dfrac{e^{-x}\ln(1+\alpha)}{\alpha}} = \dfrac{1}{\lambda \ln(1+\alpha)},~\alpha>0,~\lambda \in [1,1+\alpha]$

This is a proper distribution. It's non-negative for it's entire range of support and it integrates across that range of support to 1.

I'll have to take a look at (2)

btw, It does look like $\dfrac{e^{-x}}{\lambda}$ is the proper conditional pdf.

The problem results in oddball functions if the $\lambda$ is included in the exponent.

 romsek March 23rd, 2017 12:03 PM

Quote:
 Originally Posted by canfly (Post 565057) Thanks again for your help, for the next exercisE, we have Consider the density f(x|λ) = 1/λ*exp(−x) for x ≥ 0. 2) If the prior for λ ≥ 1 is π(λ) ∝ λ^(−2) what is the posterior ? Is it proper ? Does it admit an expectation ? Does it admit a variance ?
(2) Is pretty straightforward.

$\pi(\lambda) = \dfrac{1}{\lambda^2},~\lambda \in [1,\infty)$

a straightforward integration gets you

$f_X(x) = \dfrac {e^{-x}}{2},~0\leq x$

This results in

$f_{\lambda|X} = \dfrac{2}{\lambda^3},~\lambda \in [1,\infty)$

$E[\lambda|X] = 2$

The distribution does not admit a variance as it's 2nd moment diverges.

 canfly March 23rd, 2017 01:46 PM

Quote:
 Originally Posted by romsek (Post 565143) (2) Is pretty straightforward. $\pi(\lambda) = \dfrac{1}{\lambda^2},~\lambda \in [1,\infty)$ a straightforward integration gets you $f_X(x) = \dfrac {e^{-x}}{2},~0\leq x$ This results in $f_{\lambda|X} = \dfrac{2}{\lambda^3},~\lambda \in [1,\infty)$ $E[\lambda|X] = 2$ The distribution does not admit a variance as it's 2nd moment diverges.
Thanks again, but I don't understand why did you take for the prior a uniforme distribution by choising a alpha? in the exercise, they say it's egal to 1 or i miss understand something.
For the 2), you take 1/lambda^2 , here why don't you take a alpha like in the question 1), it's the deux points that i don't unsdertand after for te calcul i understand.

 romsek March 23rd, 2017 02:58 PM

Quote:
 Originally Posted by canfly (Post 565151) Thanks again, but I don't understand why did you take for the prior a uniforme distribution by choising a alpha? in the exercise, they say it's egal to 1 or i miss understand something. For the 2), you take 1/lambda^2 , here why don't you take a alpha like in the question 1), it's the deux points that i don't unsdertand after for te calcul i understand.
the $\propto$ symbol means proportional to not equal to.

In this case it just means that the PDF is constant i.e. a uniform distribution.

Well, it's got to be uniform over some interval.

In the second case if the distribution is $\dfrac {c}{\lambda^2}$ the fact that

$\displaystyle \int_1^\infty~\dfrac {c}{\lambda^2}~d\lambda = 1 \Rightarrow c = 1$

 canfly March 24th, 2017 02:44 AM

Quote:
 Originally Posted by romsek (Post 565161) the $\propto$ symbol means proportional to not equal to. In this case it just means that the PDF is constant i.e. a uniform distribution. Well, it's got to be uniform over some interval. In the second case if the distribution is $\dfrac {c}{\lambda^2}$ the fact that $\displaystyle \int_1^\infty~\dfrac {c}{\lambda^2}~d\lambda = 1 \Rightarrow c = 1$
Yes,very clear ;thans you again, are you a teacher in this field? For the lamba in the exponential, i am wainting the answer of my supervisor. I think, it's not change the step of your reasoning, is it?

 romsek March 24th, 2017 04:53 AM

Quote:
 Originally Posted by canfly (Post 565202) For the lamba in the exponential, i am wainting the answer of my supervisor. I think, it's not change the step of your reasoning, is it?
The problem is correct as written.

I'm just a retired engineer who actually used some of this stuff from time to time.

All times are GMT -8. The time now is 02:47 PM.