0
$\begingroup$

I need help with find the density function of $S$ if

$$S=\sum_1^{75}X_j,$$

where $X_j=I_jB_j$, and $I_1,\ldots, I_{75},B_1,\ldots, B_{75} $ are independent,

$$Pr(I_j=1)=0.01 , \ Pr(I_j=0)=0.99 \ \ \mbox{ for all } j,$$

$$Pr(B_j=50)=0.7, Pr(B_j=100)=0.3 \ \ \mbox{ for } 1 \leq j \leq 50$$ and $$Pr(B_j=75)=0.7, Pr(B_j=150)=0.3 \ \ \mbox{ for } 51\leq j \leq 75$$

I think that maybe I have to calculate convolutions, but that is a tedious job and I don't know how could I progam that in python, for example. Is there an easier way to calculate the density function of S?

Thanks for any help.

$\endgroup$
  • $\begingroup$ You have to show exact form of this pdf, or just program it in python? $\endgroup$ – vermator Mar 22 at 9:29
  • $\begingroup$ I have to show a exact form of this pdf, but I can program it in python. $\endgroup$ – Mainnet Mar 22 at 9:35
  • $\begingroup$ Are $\ I_j, B_j\ $ all indepenent? $\endgroup$ – lonza leggiera Mar 22 at 10:54
  • $\begingroup$ yes, they are independent $\endgroup$ – Mainnet Mar 22 at 10:59
  • 1
    $\begingroup$ @Minysh: I've added an answer that I hope that can help you. I can add more information to it, but I would need to understand better what do you need. $\endgroup$ – Ertxiem Mar 23 at 11:50
1
$\begingroup$

I'm not sure what do you mean by density function in this context, because I think about the probability density function which is for continuous variables and here your outcome $X_j$ is discrete, therefore, the sum $S$ of $X_j$ for $1 \leq j \leq 75$ will also be discrete.

However, I can give some suggestions about the probability mass function, which is a similar concept but for discrete variables.

We can begin by looking for the probability mass function of $X_j$. I think it's better to start by analysing the problem in two parts, $1$ to $50$ and then $51$ to $75$. Then compute the possible products $I_j B_j$. In this case we will have:

For $1 \leq j \leq 50$: $$ \begin{align} & I_j B_j = 1 \times 50 & \textrm{with} \quad Pr = 0.01 \times 0.7 \\ & I_j B_j = 1 \times 100 & \textrm{with} \quad Pr = 0.01 \times 0.3 \\ & I_j B_j = 0 \times 50 & \textrm{with} \quad Pr = 0.99 \times 0.7 \\ & I_j B_j = 0 \times 100 & \textrm{with} \quad Pr = 0.99 \times 0.3 \end{align} $$ And for $51 \leq j \leq 75$: $$ \begin{align} & I_j B_j = 1 \times 75 & \textrm{with} \quad Pr = 0.01 \times 0.7 \\ & I_j B_j = 1 \times 150 & \textrm{with} \quad Pr = 0.01 \times 0.3 \\ & I_j B_j = 0 \times 75 & \textrm{with} \quad Pr = 0.99 \times 0.7 \\ & I_j B_j = 0 \times 150 & \textrm{with} \quad Pr = 0.99 \times 0.3 \end{align} $$

Can you construct the probability mass function $P(X_j=x)$ from this data?


Edit: Just for fun, here is $P(X_j=x)$: $$ P(X_j=x) \begin{cases} 0.990 & \textrm{if} & x=0 \\ 0.007 & \textrm{if} & x=50 \wedge 1 \leq j \leq 50 \\ 0.007 & \textrm{if} & x=75 \wedge 51 \leq j \leq 75 \\ 0.003 & \textrm{if} & x=100 \wedge 1 \leq j \leq 50 \\ 0.003 & \textrm{if} & x=150 \wedge 51 \leq j \leq 75 \\ 0 & & \textrm{otherwise} \end{cases} $$

And we can split the sums in two parts. Since the distribution in each part is multinomial, we get (if I'm not mistaken): $$ \sum_{j=1}^{50} X_j = \sum_{j=0}^{50} \sum_{k=0}^{50-j} (50j + 100k) \times \frac{50!}{j! \cdot k! \cdot (50-j-k)!} \times 0.007^j \times 0.003^k \times 0.990^{50-j} $$ $$ \sum_{j=51}^{75} X_j = \sum_{j=0}^{25} \sum_{k=0}^{25-j} (75j + 150k) \times \frac{25!}{j! \cdot k! \cdot (25-j-k)!} \times 0.007^j \times 0.003^k \times 0.990^{50-j} $$

$\endgroup$
  • $\begingroup$ Thank you. I used python to calculate the coefficients of the probability generating function of $S$ and so get the probability $P(S=s)$. $\endgroup$ – Mainnet Mar 24 at 14:10
  • 1
    $\begingroup$ You're welcome, @Minysh. Just for fun, I added $P(X_j=x). :) $\endgroup$ – Ertxiem Mar 24 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.