The Negative-Binomial distribution is yet another example of a discrete, integer valued, random variable. The sample space of the distribution are all non-negative integers
\(\{0, 1, 2, \ldots\}\text{.}\) The fact that a random variable
\(X\) has this distribution is marked by β
\(X \sim \mbox{Negative-Binomial}(r,p)\)", where
\(r\) and
\(p\) are parameters that specify the distribution.
Consider 3 random variables from the Negative-Binomial distribution:
-
\(\displaystyle X_1 \sim \mbox{Negative-Binomial}(2,0.5)\)
-
\(\displaystyle X_2 \sim \mbox{Negative-Binomial}(4,0.5)\)
-
\(\displaystyle X_3 \sim \mbox{Negative-Binomial}(8,0.8)\)
The bar plots of these random variables are presented in
FigureΒ 5.4.2, reorganized in a random order.
1. Produce bar plots of the distributions of the random variables
\(X_1\text{,}\) \(X_2\text{,}\) \(X_3\) in the range of integers between 0 and 15 and thereby identify the pair of parameters that produced each one of the plots in
FigureΒ 5.4.2. Notice that the bar plots can be produced with the aid of the function β
plot" and the function β
dnbinom(x,r,p)", where β
x" is a sequence of integers and β
r" and β
p" are the parameters of the distribution. Pay attention to the fact that you should use the argument β
type = h" in the function β
plot" in order to produce the horizontal bars.
2. Below is a list of pairs that includes an expectation and a variance. Each of the pairs is associated with one of the random variables
\(X_1\text{,}\) \(X_2\text{,}\) and
\(X_3\text{:}\)
1.
\(\Expec(X) = 4\text{,}\) \(\Var(X) = 8\text{.}\)
2.
\(\Expec(X) = 2\text{,}\) \(\Var(X) = 4\text{.}\)
3.
\(\Expec(X) = 2\text{,}\) \(\Var(X) = 2.5\text{.}\)
Use
FigureΒ 5.4.2 in order to match the random variable with its associated pair. Do not use numerical computations or formulae for the expectation and the variance in the Negative-Binomial distribution in order to carry out the matching. Use, instead, the structure of the bar-plots.