Hi. I'm trying to calculate the expected value of X using this graph and I'm really struggling for some reason. Can anyone please help?
View attachment 10760
The probability density function should go like this (my calculation):
-0.1x-0.5 for x=(-9;-7)
0.2 for x=(-7;-5)
Calculus? Don't really need it. Just wondering.
Definition? Sum x * p(x) over all x.
This is f(x) (continuous function), that's the problem. Integrals will be necessary
Well, I tried to calculate the EV for -0.1x-0.5 for x=(-9;-7) separately:
View attachment 10761
but the answer is -4.86 which is obviously wrong.
Why is that obviously wrong? [-9,-7] is NOT a Probability Distribution. Keep working until you've covered the whoie distribution.
For the record, if you gross up the partial you did, you may be happier with the interim and partial result. -4.86 / 0.6 = -8.1 and you probably feel better about that. Don't let this distract you from the actual problem.
What is the area under the curve from -9 to -7? Please don't bother with integration as it is a simple trapezoid that you have.So if EV of "0.2 for x=(-7;-5)" is -6, how do I work out the final result? By the way, -8.1 makes sense. Where did you get that 0.6 from?
So if EV of "0.2 for x=(-7;-5)" is -6, how do I work out the final result? By the way, -8.1 makes sense. Where did you get that 0.6 from?
Well, I tried to calculate the EV for -0.1x-0.5 for x=(-9;-7) separately:
View attachment 10761
but the answer is -4.86 which is obviously wrong.
You now have to find integral(from -7 to -5) of (0.2)*x , for the other part of the pdf, and add it on. (I'm being lazy with LaTex - hey it's NYE!!)
Formulas are dangerous. Definitions are your friend.This is the other issue. On (-7, -5) it's uniform distribution, but when I use the formula fot its EV: E(X) = (a+b)/2, the result is -6 (which seems logical), whereas if I use integral the same way as with the first part of the pdf, the answer is -2.4. Why is that?
This is the other issue. On (-7, -5) it's uniform distribution, but when I use the formula fot its EV: E(X) = (a+b)/2, the result is -6 (which seems logical), whereas if I use integral the same way as with the first part of the pdf, the answer is -2.4. Why is that?
Formulas are dangerous. Definitions are your friend.
The definition of a uniform distribution is that its probability density function is
\(\displaystyle f(x) = \dfrac{1}{b - a} \text { if } a \le x \le b \text { and } f(x) = 0 \text { otherwise.}\)
What about your f(x)?
\(\displaystyle -\ 5 - (-\ 7) = 2 \implies \dfrac{1}{-\ 5 - (-\ 7)} = \dfrac{1}{2} = 0.5 \ne 0.2 = f(x).\)
In other words, you are not dealing with a uniform distribution. So you are not using a formula that is relevant.
\(\displaystyle g(x) = 0.5 \text { if } -\ 7 \le x \le -\ 5 \implies\)
\(\displaystyle \displaystyle \int_{-7}^{-5} 0.5 * x \ dx = 0.25(-\ 5)^2 - 0.25(7^2) = \dfrac{25 - 49}{4} = \dfrac{-\ 24}{4} = -\ 6.\)
The formula works if you have a uniform distribution, but you can't just assume that a distribution is uniform. All uniform distributions are rectangular, but not all rectangular distributions are uniform.
Happy New Year to you as well. Glad to have been of any help. Probability theory is not my strongest topic.Thank you, this is actually really helpful. Happy new year by the way
Happy New Year to you as well. Glad to have been of any help. Probability theory is not my strongest topic.
I just was warning you that relying on formulas is no substitute for attention to definitions and for logical thought.
But it is tkhunny who is trying very patiently to walk you through the logic of this kind of problem.