# A certain random experiment has 90% probability of success. Each success costs 5 euro and each failure costs 10. Total cost of 20 experiments?

A certain experiment can have two possible outcomes: "failure" or "success". It is known that the probability of success is 90%. The cost of a successful experiment is 5 euro and the cost of an unsuccessful one is 10 euro. The experiment is repeated 20 times.

Let $X$ be the random variable that refers to the number of successes.

Show that the total cost $k$ of the 20 experiments can be expressed by $k=200-5X$

I already solved this problem, but while I was solving I came accross this doubt:

• Since this follows a binominal distribution then the more experiments you do, the more the results tend to approximate a certain value. (or is that normal distribution?)
• So, the more experiments you do, the more the number of successes comes closer to 90% of the number of experiments.

• So: $$20 \cdot .9 = 18$$ $$20 \cdot .1 = 2$$ $$18\cdot 5 = 90$$ $$2 \cdot 10 = 20$$

So, the total cost for 20 experiments would be $90+20 = 110$ euro.

Is this correct? If yes, what does 110 euro mean? Is it the average cost for 20 experiments?

$k=200−5X$ is independent of the probability. For the expected value, you don't need the distribution either.
$$E\{k\}=200-5E\{X\}=200-5*20*0.9=110$$

for the higher moments (variance, etc) you can use the distribution's properties.

• What is $E\{k\}$? Oct 22, 2016 at 1:04
• That's the expected value. Oct 22, 2016 at 1:18

You can use law of total expectation:

$$\mathsf{E}(X)=\sum_{i=1}^n \mathsf{E}(X|A_i)P(A_i)$$

Here $X$ is a random variable representing the cost, $n=2$, $A_1$ is failure and $A_2$ is success. Hence,

\begin{align} \mathsf{E}(X) &= \mathsf{E}(X|\text{success})P(\text{success})+\mathsf{E}(X|\text{failure})P(\text{failure})\\ &=5(0.9)+10(0.1)=4.6 \end{align} For $20$ independent experiments, the expected cost is $20(4.6)=92$