Help changing form of an equation

daverv

New member
Joined
Aug 27, 2021
Messages
4
Hi all. I'm having trouble changing an equation to a different form. I have been given the formula:

[math]f(x; \mu, \alpha) = \sqrt{\frac{1}{2{\pi}{\alpha}x^3}}exp(-\frac{(x-µ)^2}{2{\alpha}{\mu}^2x})[/math]
I want to convert it to the form below or as close as possible:

[math]f(x; \mu; \alpha) = exp(\frac{x\mu - b(\mu)}{\alpha} + c(x, \alpha))[/math]
I get to this point and then am not sure how to reach a form that is closer to matching the preferred form:

[math]f(x; \mu, \alpha) = exp(-log (\frac{1}{2{\pi}{\alpha}x^3}) - \frac{x^2 + 2x{\mu} - {\mu}^2}{2{\alpha}{\mu}^2x})[/math]
[math]f(x; \mu, \alpha) = exp(-\frac{x^2 +2x\mu - \mu^2}{2\alpha\mu^2x} + log(\frac{1}{2\pi\alpha x^3}))[/math]
Ideally I would want to end up with something similar to this, but I'm just not sure how to get there :

[math]f(x; \mu, \alpha) = exp(- \frac{x\mu - 2\mu}{\alpha^2} + log(\frac{1}{2\pi\alpha x^3}))[/math]
Any help would be greatly appreciated. This isn't my area of strength so I may have made one or more silly mistakes along the way but I'm happy to have them pointed out!
Thanks
 
Last edited:
There are already several errors when you get to this:
[math]f(x; \mu, \alpha) = exp(-log (\frac{1}{2{\pi}{\alpha}x^3}) - \frac{x^2 + 2x{\mu} - {\mu}^2}{2{\alpha}{\mu}^2x})[/math]
Please show how you got to that, so we can correct your errors.

Also, as Shady pointed out, we need to know what sort of functions b and c are supposed to be.

It may be helpful if you tell us the context of your question. Why do you want to put it in this form, and why do you think you can? I don't see how the squaring can be eliminated.
 
The definition of b and c appear to be just ensuring that they are a function of mu and x, alpha respectively - I have attached an example we were given which will hopefully help clarify (although they use symbology sigma instead of alpha).

The way I got to where I did was using the attached example and trying to follow similarly. It seems like you can put the square root on the inside of the exp bracket if it is behind log from the example so I did that and then I expanded the top of the second bracket. But I am a bit lost in this as you can probably tell.

The context of the question is to attempt to show that the normal distribution formula I was given is part of the exponential family which is usually in the form that I provided as second:
[math]f(x;μ;α)=exp( \frac {xμ−b(μ)}{\alpha} +c(x,α))[/math]f(x;μ;α)=exp(αxμ−b(μ)+c(x,α))

Thanks in advance
 

Attachments

  • example.png
    example.png
    25.3 KB · Views: 4
Still confused on nature of b and c
By the way sometimes e^x is called exp(x) is that the case or is exp is some base a ^x or what is the meaning of exp
 
From what I can gather - b and c can take many forms and they just use the letters to represent that there can be difference between these areas of a distribution.
In the example they note:

[math]b(\mu) = \frac{1}{2}\mu^2[/math]
and

[math]c(x, \alpha) = -\frac{1}{2} (\frac{y^2}{\sigma^2} + log(2\pi \sigma^2))[/math]
I believe in this case exp(x) is e^x.
I hope this is making it clearer?
 
The definition of b and c appear to be just ensuring that they are a function of mu and x, alpha respectively - I have attached an example we were given which will hopefully help clarify (although they use symbology sigma instead of alpha).

The way I got to where I did was using the attached example and trying to follow similarly. It seems like you can put the square root on the inside of the exp bracket if it is behind log from the example so I did that and then I expanded the top of the second bracket. But I am a bit lost in this as you can probably tell.

The context of the question is to attempt to show that the normal distribution formula I was given is part of the exponential family which is usually in the form that I provided as second:
[math]f(x;μ;α)=exp( \frac {xμ−b(μ)}{\alpha} +c(x,α))[/math]f(x;μ;α)=exp(αxμ−b(μ)+c(x,α))

Thanks in advance
I see the role of b and c now, that they just restrict what variables can be present there (in particular, [imath]c(x,\alpha)[/imath] can't contain [imath]\mu[/imath]. Also, I see that what you are starting with is in fact the inverse Gaussian distribution.

But I really need to see the detailed steps in your work. It almost sounds like you are trying to read magical rules into the example you were given, rather than following algebraic rules that you should know well by now.

I'll demonstrate one of the steps, and your error at that point. In the given formula, you have [math]\sqrt{\frac{1}{2{\pi}{\alpha}x^3}}[/math] In order to pull this inside the exponential function, you need to take its log: [math]\exp\left(\log\left(\sqrt{\frac{1}{2{\pi}{\alpha}x^3}}\right)\right)[/math] The log of a square root is 1/2 the log of the radicand; you just dropped it. You should now have [math]\exp\left(\frac{1}{2}\log\left(\frac{1}{2{\pi}{\alpha}x^3}\right)\right)[/math] Next, the log of a reciprocal is the negative of the log, so you should now have [math]\exp\left(-\frac{1}{2}\log\left(2{\pi}{\alpha}x^3\right)\right)[/math] You have the negative, but you still have the reciprocal, too.

Do you see why your [math]exp(-log (\frac{1}{2{\pi}{\alpha}x^3}) ...[/math] is wrong?

Now go through the rest of it, which has little things like sign errors.

And to move forward, you'll want to split up the quadratic numerator into a term containing x, and one with no x's; then simplify the fraction containing each of them.
 
I see the role of b and c now, that they just restrict what variables can be present there (in particular, [imath]c(x,\alpha)[/imath] can't contain [imath]\mu[/imath]. Also, I see that what you are starting with is in fact the inverse Gaussian distribution.

But I really need to see the detailed steps in your work. It almost sounds like you are trying to read magical rules into the example you were given, rather than following algebraic rules that you should know well by now.

I'll demonstrate one of the steps, and your error at that point. In the given formula, you have [math]\sqrt{\frac{1}{2{\pi}{\alpha}x^3}}[/math] In order to pull this inside the exponential function, you need to take its log: [math]\exp\left(\log\left(\sqrt{\frac{1}{2{\pi}{\alpha}x^3}}\right)\right)[/math] The log of a square root is 1/2 the log of the radicand; you just dropped it. You should now have [math]\exp\left(\frac{1}{2}\log\left(\frac{1}{2{\pi}{\alpha}x^3}\right)\right)[/math] Next, the log of a reciprocal is the negative of the log, so you should now have [math]\exp\left(-\frac{1}{2}\log\left(2{\pi}{\alpha}x^3\right)\right)[/math] You have the negative, but you still have the reciprocal, too.

Do you see why your [math]exp(-log (\frac{1}{2{\pi}{\alpha}x^3}) ...[/math] is wrong?

Now go through the rest of it, which has little things like sign errors.

And to move forward, you'll want to split up the quadratic numerator into a term containing x, and one with no x's; then simplify the fraction containing each of them.
Thank you so much for your feedback - I just read through your explanation and it definitely makes a lot more sense now. I unfortunately am taking this course as an optional part of my studies and didn't realise how out my depth I was until it was too late to withdraw. I'll write it out when I get back home and post my results. Thank you again for taking the time to help!
 
Top