Finding the expectation of a categorical variable times a random amount
Finding the expectation of a categorical variable times a random amount
Loading saved threads...
Vefeagins · External communityPost link
External question — Cross Validated Stack Exchange
Author: Vefeagins
Original post: https://stats.stackexchange.com/questions/652555
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Say we have
$J$
trading cards and each have a dollar value of
$u_{j}$
and I am allowed to make 1 draw.
$$
u_{j} \sim N(\mu,1)
$$
Where the value of each trading card is independent and identically distributed.
The probability of drawing a trading card is a function of
$u_{j}$
.
We could specify this as a multinominal regression for the
$J$
cards.
$$
\text{ln Pr}(C_i = j) = u_{j} - \text{ln} Z_i
$$
$$
Z_i = \sum_{j}^J e^{u_{j}}
$$
$Z_i$
is a normalizing value to ensure the probabilities add up to one.
Where
$C_i$
is a categorical distribution where each probablity
$p_j$
is given with the above formula. This is also the same as multinominal distribution with
$n= 1$
.
$$
C_i \sim Categorical(p_1^{[C_i = 1]} \cdots p_J^{[C_i = J]})
$$
The random value of the card would be:
$$
u_{1C_i} = \sum_j^J [C_i = j] * u_{j}
$$
If I wanted to know the expected value of dollar amount from drawing one card. How would I set that up?
$$
{\bf E} (u_{C_i}) = \int u_{C_i} f_{pdf}(u_{C_i})
$$
I am interested in setup what the integral or sum would look like? I understand that it will not simplify into a nice, closed form answer.
I was struggling with how to handle that the probability of
$\text{Pr}(C_i = j)$
depends on the set
$U = \{u_1, \cdots u_J\}$
and not just a particular
$u_{j}$
.
The motivating issue for this problem has to do with a complicated multinominal regression where there are random beta coefficients.
Quote
Report
JimB · External communityPost link
External answer — Cross Validated Stack Exchange
Author: JimB
Original post: https://stats.stackexchange.com/a/652602
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
If you are just interested in setting up the integrals for the expectation, then maybe the following does that:
$$\int_{-\infty}^{\infty}\cdots\int_{-\infty}^{\infty}\frac{\sum _{i=1}^J e^{u_i} u_i}{\sum _{i=1}^J e^{u_i}}
\times \prod _{i=1}^J \frac{e^{-\frac{1}{2} (u_i-\mu)^2}}{\sqrt{2 \pi }} du_1 \cdots du_J$$
$$=\int_{-\infty}^{\infty}\cdots\int_{-\infty}^{\infty}\frac{\sum _{i=1}^J e^{v_i+\mu} (v_i+\mu)}{\sum _{i=1}^J e^{v_i+\mu}} \times \prod _{i=1}^J \frac{e^{-\frac{1}{2} v_i^2}}{\sqrt{2 \pi }} dv_1 \cdots dv_J$$
$$=\mu+\int_{-\infty}^{\infty}\cdots\int_{-\infty}^{\infty}\frac{\sum _{i=1}^J e^{v_i} v_i}{\sum _{i=1}^J e^{v_i}} \times \prod _{i=1}^J \frac{e^{-\frac{1}{2} v_i^2}}{\sqrt{2 \pi }} dv_1 \cdots dv_J$$
Numerical integration will work fine for small values of
$J$
but you'll likely need to perform simulations for values of
$J$
greater than 4.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External question — Cross Validated Stack Exchange Author: Vefeagins Source score (net votes, not local likes): 1 Original post: https://stats.stackexchange.com/questions/652555 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Say we have $J$ trading cards and each have a dollar value of $u_{j}$ and I am allowed to make 1 draw. $$ u_{j} \sim N(\mu,1) $$ Where the value of each trading card is independent and identically distributed. The probability of drawing a trading card is a function of $u_{j}$ . We could specify this as a multinominal regression for the $J$ cards. $$ \text{ln Pr}(C_i = j) = u_{j} - \text{ln} Z_i $$ $$ Z_i = \sum_{j}^J e^{u_{j}} $$ $Z_i$ is a normalizing value to ensure the probabilities add up to one. Where $C_i$ is a categorical distribution where each probablity $p_j$ is given with the above formula. This is also the same as multinominal distribution with $n= 1$ . $$ C_i \sim Categorical(p_1^{[C_i = 1]} \cdots p_J^{[C_i = J]}) $$ The random value of the card would be: $$ u_{1C_i} = \sum_j^J [C_i = j] * u_{j} $$ If I wanted to know the expected value of dollar amount from drawing one card. How would I set that up? $$ {\bf E} (u_{C_i}) = \int u_{C_i} f_{pdf}(u_{C_i}) $$ I am interested in setup what the integral or sum would look like? I understand that it will not simplify into a nice, closed form answer. I was struggling with how to handle that the probability of $\text{Pr}(C_i = j)$ depends on the set $U = \{u_1, \cdots u_J\}$ and not just a particular $u_{j}$ . The motivating issue for this problem has to do with a complicated multinominal regression where there are random beta coefficients.
Checking account access…