# Counting and Probability

## Factorial Notation

For the following sections on counting, we need a simple way of writing the product of all the positive whole numbers up to a given number. We use **factorial notation** for this.

Definition of *n*!

** n factorial** is defined as the product of all the integers from 1 to

*n*(the order of multiplying does not matter) .

We write "*n* factorial" with an exclamation mark as follows: *n*!

*n*! = (*n*)(*n* − 1)(*n* − 2)...(3)(2)(1)

(http://www.intmath.com/counting-probability/1-factorial-notation.php)

## Basic Principles of Counting

Counting

An efficient way of **counting** is necessary to handle large masses of statistical data (e.g. the level of inventory at the end of a given month, or the number of production runs on a given machine in a 24 hour period, etc.), and for an understanding of **probability**.

In this section, we shall develop a few counting techniques. Such techniques will enable us to count the following, without having to list all of the items:

the number of ways,

- the number of samples, or
- the number of outcomes

Addition Rule

Let *E*1 and *E*2 be **mutually exclusive** events (i.e. there are no common outcomes).

Let event *E* describe the situation where either event *E*1 **or** event *E*2 will occur.

The number of times event *E* will occur can be given by the expression:

*n*(*E*) = *n*(*E*1) + *n*(*E*2)

Multiplication Rule

Now consider the case when two events *E*1 and *E*2 are to be performed and the events *E*1 and *E*2 are**independent** events i.e. one does not affect the other's outcome.

Multiplication Rule in General

Suppose that event *E*1 can result in any one of *n*(*E*1) possible outcomes; and for each outcome of the event*E*1, there are *n*(*E*2) possible outcomes of event *E*2.

Together there will be *n*(*E*1) × *n*(*E*2) possible outcomes of the two events.

*n*(*E*) = *n*(*E*1) × *n*(*E*2)That is, if event *E* is the event that both *E*1 and *E*2 **must** occur, then

(http://www.intmath.com/counting-probability/2-basic-principles-counting.php)

## example

**How many different combinations can you choose from 2 t-shirts and 4 pairs of jeans?**

There are 2 t-shirts and with each t-shirt we could pick 4 pairs of jeans.

2×4=8 possible combinations.

## Permutation

__Theorem 1:__ Arranging *n* Objects

*n* distinct objects can be arranged in n! ways.

__Theorem 2:__ Number of Permutations

The number of permutations of *n* distinct objects taken *r* at a time, denoted by nPr, where repetitions are not allowed, is: nPr = n(n−1)(n−2)...(n−r+1) = n! ÷ (n−r)!

__Example: __In how many ways can a supermarket manager display

**5 brands of cereals in 3 spaces on a shelf?**

- 5P3 = 5! ÷ [(5-3)!] = 5! ÷ 2! = 60

__Theorem 3: __Permutations of Different Kinds of Objects

The number of different permutations of *n* objects of which *n*1 are of one kind, *n*2 are of a second kind, ... *nk *are of a *k*-th kind is: n! ÷ (n1! × n2! × n3! ×... nk!)

__Theorem 4:__ Arranging Objects in a Circle

*n* distinct objects in a circle can be arranged in (n−1)! ways

## Combinations

*n*objects taken

*r*at a time is a selection which does not take into account the arrangement of the objects, meaning the order is not important.

__Number of Combinations:__

The number of combinations in which *r* objects can be selected from a set of *n* objects, where repetition is not allowed, is denoted by: nCr = n! ÷ [r! (n - r)!]

## Probability

Suppose an event *E* can happen in *r* ways out of a total of *n* possible equally likely ways.

Then the probability of occurrence of the event is denoted by: P(*E*) = r ÷ n

The probability of non-occurrence of the event is denoted by: P(É) = 1 - (r ÷ n)

Therefore, P(E) + P(É) = 1 (the sum of probabilities in any experiment is 1)

__Using Sample Spaces:__

When an experiment is performed, a sample space of all possible outcomes is set up.

In a sample of *N* equally likely outcomes, a chance of 1N is assigned to each outcome.

The probability of an event for such a sample is the number of outcomes favorable to *E* divided by the total number of equally likely outcomes in the sample space *S* of the experiment.

P(E)=n(E) ÷ n(S)

n(E) is the number of outcomes favorable to *E*

n(S) is the total number of equally likely outcomes in the sample space *S* of the experiment.

__Properties of Probability:__

- 0 ≤
*P*(event) ≤ 1 *P*(impossible event) = 0*P*(certain event) = 1

__Example:__ A card is drawn at random from a deck of cards. What is the probability of getting the 3 of diamond?

Let E be the event "getting the 3 of diamond". An examination of the sample space shows that there is one "3 of diamond" so that n(E) = 1 and n(S) = 52. Hence the probability of event E occuring is given by P(E) = 1 / 52