# Is there any way of estimating the value of a variable when you know its probability distribution?

I have one question regarding the estimation of an unknown variable.

Is there any way of estimating the value of a variable when you know its probability distribution? In this case I have a variable which is distributed on the interval (1, 2), with a 25% probability of 2, and uniformly distributed otherwise.

• Cross-posted at statalist.org/forums/forum/general-stata-discussion/general/… Telling people about cross-posting is polite in any forum, and some have explicit policies about it. 1.625 is the mean of the distribution. There might be grounds for other prediction rules. but I can't see any here. – Nick Cox Nov 20 '16 at 11:37
• Do you want to sample from that distribution? – mdewey Nov 20 '16 at 12:22
• It's not really clear what you're asking. Can you explain more about what you're trying to achieve? – Glen_b Nov 21 '16 at 10:46

• If you have quadratic loss $E (y - \hat{y})^2 \rightarrow \min$, then your $\hat{y}$ equals to the mean values of the distribution $E y$.
• If you have $L1$ loss $E |y - \hat{y}| \rightarrow \min$, you shoud use median of the distribution as an estimate $\hat{y}$ that minimize the target loss
• For loss function $E [y \ne \hat{y}]$ ($[x]$ is the indicator function that equals $1$ if $x = 1$ and $0$ otherwise) you should use the most probable values, $2$ in your case.