Professional Documents
Culture Documents
“X ∼ Binomial(n,p)”.
The probabilities of the various possible values of a
Binomial random variable may be computed with the
aid of the R function “dbinom”.
The input to this function is a sequence of values, the
value of n (sample size = number of trials) , and the
value of p (probability of success).
The output is the sequence of probabilities associated
with each of the values in the first input.
The expression “start.value : end.value” produces a
sequence of numbers that initiate with the number
“start.value” and proceeds in jumps of size one until
reaching the number “end.value”.
“pbinom” is a function that produces the cumulative
probability of the Binomial.
cumulative probability is obtained by summing all the
probabilities associated with values that are less than or
equal to the input value.
“X ∼ Poisson(λ)”
the number of trials ‘n’ , probability of success in each
trial ‘p’ and expectation is denoted by ‘λ’ .
The function “dpois” computes the probability.
The expectation of the distribution is entered in the
second argument.
“ppois” computes the cumulative probability.
X ∼ Normal(µ, σ2)
where µ = E(X) is the expectation of the random variable
and σ2 = Var(X) is its variance
“dnorm” computes The density of the Normal distribution.
“pnorm” computes The cumulative probability .
Z = (X − µ)=σ , Z ∼ N(0, 1)
“qnorm” computes The percentiles of the Normal
distribution
The first argument to the function is a probability (or a
sequence of probabilities), the second and third arguments
are the expectation and the standard deviations of the
normal distribution.
If these arguments are not provided the function computes
the percentiles of the standard Normal distribution.
the Normal approximation is valid when n, the number of
independent trials in the Binomial distribution, is large.
the Normal approximation for the Binomial(n, p)
distribution may not be so good when the number of trials n
is small.