Calculating mean value and variance

190 Views Asked by At

The problem is following:

Let's assume you are the owner of a shop in a town with population of N. For every person in town there is a probability of 0.25 to come and visit the shop. Every person who visits the shop spends from 0 to 50$ uniformly. Y is the amount of money spent in the shop every day. You need to calculate mean value and variance of Y.

Anyone has any idea on how to solve this? I need analytical solution to confirm the results of a MATLAB simulation. Thanks!

1

There are 1 best solutions below

4
On BEST ANSWER

Let $V_i$ be the Bernoulli random variable with parameter $p = 0.25$ that takes value $1$ if the $i$th individual visits the shop, and $0$ otherwise. Also let $X_i$ denote the amount spend by person $i$ at the shop i.e. $X_i | (V_i = 1) \sim \text{Unif}(0, 50)$ and $X_i | (V_i = 0) = 0$. So the total Expenditure is

$Y = X_1 + X_2 + \ldots + X_N$

Since $X_i$s are independently and identically distributed,

$\displaystyle\mathbb{E}(Y) = N\mathbb{E}(X_1) = N(\mathbb{E}(\mathbb{E}(X_1|V_1)))= N(0.25\times 25) = \frac{25N}{4}$

and

$\displaystyle\mathbb{V}(Y) = N\mathbb{V}(X_1) = N(\mathbb{E}(\mathbb{V}(X_1|V_1)) + \mathbb{V}(\mathbb{E}(X_1|V_1))) = N\left(\frac{2500}{48} + \frac{1875}{16}\right) = \frac{8125N}{48}$