Artificial intelligent assistant

Two Face offers Batman a game of chance Two Face offers Batman a game of chance, where he tosses a coin and will punch him if the result is “heads”. However, the coin is not fair and has some probability $p$ of landing as “heads”. a. Develop an expression* for the standard deviation of the number of times Two Face will punch Batman per a single coin toss, as a function of $p$. b. What is the value of the standard deviation when $p=0.1$, $p=0.5$ and $p=0.9$?

Let $X$ be the number of times that Batman gets punched. Then $X$ is a Bernoulli random variable with parameter $p$, so if we are familiar with the Bernoulli distribution then we might already know the expected value and variance of $X$ by heart. If not, we can compute them as follows.

The expected value of $X$ is $$ E(X) = p \cdot 1 + (1-p) \cdot 0 = p. $$ The variance of $X$ is $\text{Var}(X) = E(X^2) - E(X)^2$. Note that $$ E(X^2) = p \cdot 1^2 + (1 - p) \cdot 0^2 = p. $$ Thus, $$ \text{Var}(X) = p - p^2 = p(1 - p). $$ The standard deviation of $X$ is $\sqrt{p(1-p)}$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f6e6e67d624f40af0573a85b420455a6