# Special Random Variables

Special random variables are special types of distributions. They are found to be common in real life distributions.

## Distributions

The following distributions can be used to calculate probabilities in different experimental trials. Most of these formulas can be found on the formula sheet.

### Binomial

Binomial distributions are used for random experiments that involve discrete results or either success or failure.
It is represented as:

X ~ Bin(n, π)

The probability function for binomial distributions is: where:

n = number repetitions of the experiment
X = number of successes
π = probability of a success
E(X) = nπ
Var(X) = nπ(1-π)

Example:

If a shaft manufacturer produces shafts of a certain tolerance, with a probability of being off of tolerance at 0.5%, what is the probability of having to throw out more than 2 shafts in a batch of 100.
It can be seen that the sample size if 100 and the probability is 0.005, therefore:
X ~ Bin(100, 0.005)
P(X>=2) = 1 - (P(X=0) + P(X=1))
= 1 - (100C0 * 0.0050 * 0.995100 + 100C1 * 0.0051 * 0.99599 = 0.0898

### Hypergeometric

Hypergeometric distributions are similar to binomial distributions, with the difference that the past trial affected the probability of the second trial.
It is represented as:

X ~ Hyp(N, k, n)

The probability function for hypergeometric distributions is: where:

X = successes from the sample
k = successes in a sample space
n = size of the sample
N = size of the sample space
E(X) = nk/N
Var(X) = (nk/N)*(1 - k/N)*((N-n)/(N-1))

Example:

A gear box requires that at least 9 of the 10 gears be in tolerance to function adequately. If the fitter chooses the 10 gears from a selection of 100, with 80 of those gears in tolerance, what is the probability of the gear box functioning?
It can be seen that the size of the sample space, N, is 100, and the functioning gears, k, is 80. We need to select n gears, being 10 for the gear box, giving:
X ~ Hyp(100, 80, 10)
P(X>=9) = P(X=9) + P(X=10)
= ((80C9)*((100-80)C(10-9)))/(100C10) + ((80C10)*((100-80)C(10-10)))/(100C10) = 0.363

### Poisson

The poisson distribution involves using the mean of the distribution to find the probability of observing certain discrete observation.
It is represented as:

X ~ P(λ)

The probability function for poisson distributions is: where:

λ = mean of the distribution
X = number of occurrences
E(X) = λ
Var(X) = λ

Example:

If the average number of ibises seen during a day at university is 4.6, what is the probability that there would be no ibises seen on the following day of university?
X ~ P(4.6)
P(X=0) = exp(-4.6)*(4.60)/0!
= 0.01

### Uniform

The uniform distribution involves a linear distribution of probability between the intervals α and β.
It is represented as:

X ~ U[α,β]

The probability function for uniform distributions is the integral of the following function, where the limits of the integral is the time of the occurrence of the observations: Or between subintervals a and b:
P(a<X<b) = (b-a)/(β-α)
where:

α = start of interval
β = end of interval
a = start of subinterval
b = end of subinterval
E(X) = (α + β)/2
Var(X) = (β - α)2/12

Example:

A passenger arrives at a train platform between 5pm and 6pm, where the trains arrive every 10 minutes. What is the probability that the passenger has to wait less than 3 minutes to catch a train?
X ~ U[0,60]
P(7<X<10)+ P(17<X<20) + P(27<X<30) + P(37<X<40) + P(47<X<50) + P(57<X<60)
= (3+3+3+3+3+3)/60 = 0.3

### Exponential

The exponential distribution is one that allows the calculation of the probability of an event occurring over a certain amount of time. It is represented as:

X ~ Exp(λ)

The probability function for exponential distributions is the integral of the following function, where the limits of the integral is the time of the occurrence of the observations: where:

λ = mean of sample space
E(X) = 1/λ
Var(X) = 1/λ2

Example:

On average, 5 stray cats wonder into a backyard a day. What is the probability that there would be a cat in the backyard less than 10 minutes after scaring another cat off?
X ~ Exp(5)
P(X<10) = (from 0 to 10/1440) 5*exp(-5x) dx
= 1 - exp(-5/144) = 0.034

## End

This is the end of this topic. Click here to go back to the main subject page for Numerical Methods & Statistics.