The mean and standard deviation of a binomial random variable with parameters \(n\) and \(p\) are

\[ \mu = np \] and \[ \sigma = np(1 - p)\text{,}\] respectively.

Let us recall the example from the previous section. The probability to pass the final statistics exam is 0.3. We consider a class of 25 students. The random variable \(X\), which corresponds to success in the exam, is a binomial random variable and follows a binomial distribution with the parameters \(n=25\) and \(p=0.3\). Thus, the mean, \(\mu\), and the standard deviation, \(\sigma\), can be computed as follows:

\[\mu = np = 25 \times 0.3 = 7.5\]

and

\[ \sigma = np(1 - p) = 25 \times 0.3 \times (1-0.3) = 5.25 \]

The following plot visualizes the binomial distribution with the parameters \(n=25\) and \(p=0.3\) as well as its mean \(\mu\) and standard deviation \(\sigma\).


Citation

The E-Learning project SOGA-R was developed at the Department of Earth Sciences by Kai Hartmann, Joachim Krois and Annette Rudolph. You can reach us via mail by soga[at]zedat.fu-berlin.de.

Creative Commons License
You may use this project freely under the Creative Commons Attribution-ShareAlike 4.0 International License.

Please cite as follow: Hartmann, K., Krois, J., Rudolph, A. (2023): Statistics and Geodata Analysis using R (SOGA-R). Department of Earth Sciences, Freie Universitaet Berlin.