I am trying to compute the variance of a random variable
$\min(N_k,p)$, where $N_k$ is a random variable and $p$ is a fixed number. I have computed the expectation using the conditional expectation, which is as given below $$\mathbb{E}[\min(N_k, p)] = \mathbb{E}[N_k \mid N_k \leq p] *\mathbb{P}(N_k \leq p)+ \mathbb{E}[\min(N_k, p)\mid N_k > p] * \mathbb{P}(N_k > p).$$ Now, to compute the variance, we need to compute $\mathbb{E}[(\min(N_k,p))^2]$. I don't have any idea how I should proceed to compute this because I don't have access to $\mathbb{P}(\min(N_k,p)=i)$.
$\begingroup$
$\endgroup$
3
-
$\begingroup$ If you don't have any information about the distribution of $N_k$, there is no way you can compute this. $\endgroup$– user6247850Commented Jan 29 at 17:51
-
$\begingroup$ Use the same formula that you used for the expectation. $\endgroup$– KrokiCommented Jan 29 at 17:57
-
$\begingroup$ @user6247850 here, $N_k$'s are discrete random variables. Let's say it is a binomial distribution. $\endgroup$– Sumit SinghCommented Jan 29 at 21:36
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
5
You can still apply conditional probability, as $$ \begin{align*} \text{Var}(\min(N_k, p)) &= E[(\min(N_k, p))^2] - E[\min(N_k, p)]^2 \\ &= E(N_k^2 | N_k \leq p)P(N_k \leq p) + p^2 P(N_k > p) - \left[ E(N_k | N_k \leq p) P(N_k \leq p) + p P(N_k > p) \right]^2 \end{align*} $$
-
$\begingroup$ how do we go for this $E(N_k^2 | N_k \leq p)$? $\endgroup$ Commented Jan 29 at 21:39
-
$\begingroup$ I'm assuming you know the distribution of $N_k | N_k \leq p$. So then you just use the variance of $N_k | N_k \leq p$. $$ Var(N_k | N_k \leq p) = E(N_k^2 | N_k \leq p) - E(N_k | N_k \leq p)^2 \implies E(N_k^2 | N_k \leq p) = Var(N_k | N_k \leq p) + E(N_k | N_k \leq p)^2 $$ $\endgroup$– Pavan C.Commented Jan 30 at 20:12
-
$\begingroup$ Actually, I have access to the distribution of $N_k$ only. I can't compute the variance you mentioned. I have found a way to calculate the expectation, can you verify that is it correct or not? $\endgroup$ Commented Jan 31 at 4:34
-
$\begingroup$ \begin{align*} E(N_k^2\mid N_k\leq p) &= \sum_{i=1}^n i^2\, P(N_k = i \mid N_k\leq p)\\ &= \sum_{i=0}^n i^2 \;\dfrac{P(N_k = i \cap N_k\leq p)}{P(N_k\leq p)}\\ &= \sum_{i=0}^p i^2 \;\dfrac{P(N_k = i \cap N_k\leq p)}{P(N_k\leq p)}\quad\quad [\text{as $P(N_k = i \cap N_k\leq p)= 0$ for $i>p$.} ]\\&= \sum_{i=0}^p i^2 \;\dfrac{P(N_k = i)}{P(N_k\leq p)}\\&= \dfrac{\sum_{i=0}^p i^2 \,P(N_k = i)}{P(N_k\leq p)}\\ \end{align*} $\endgroup$ Commented Jan 31 at 4:41
-
$\begingroup$ Thus we have $$E(N_k^2 \mid N_k\leq p) * P(N_k\leq p) = \sum_{i=0}^p i^2 \,P(N_k = i) $$ Can I do that? I am a little bit confused. $\endgroup$ Commented Jan 31 at 4:43