# FORMULAE: Permutation and Combination

### Permutation and Combination

Calculating permutation of 'n' different things taken 'r' at a time with repetition:

Suppose we have to wear 4 rings on three fingers and there is no restriction on number of rings on each finger. Then number of ways:
Total = ( each ring can be worn in 3 ways ) = 3*3*3*3 = 34

Calculating permutation of 'n' different alphabets of which few are repeated:

Suppose we wish to find out the total arrangements of word MALAYALAM then:
Total ways = 9! / ( 2! * 4! * 2! )

Number of selections of 'r' things out of 'n' identical things is 1:

Suppose we want to choose 5 marbles out of 100 identical marbles then number of ways is 1.

Calculate circular permutation:

The number of ways of arranging 'n' people in a circular track is ( n - 1 )!

Number of squares in a square grid of dimension n*n:

Total rectangles = 13 + 23 + 33 + 43 +...+ n3
Total squares = 12 + 22 + 32 + 42 + ... + n2

### Bayes Theorem of Probability

P ( A ) = Probability of occurrence of an event A.
P ( B / A) = Probability of occurrence of event B given A has already occurred.

Conditional probability:

Probability that an event A shall occur given that B has occurred is:

P ( A / B ) = P ( A ∩ B ) / P (B)

Thus probability that event A shall occur given that event B has occurred is ratio of Probability that event A and B shall occur and Probability that event B shall occur.

Bayes theorem:

P ( Ai / B ) = { P (B/Ai) . P (Ai) } / { P (B/A1) . P (A1) + P (B/A2) . P (A2) + .... + P (B/An) . P (An) }

Q 1: Suppose an item is manufactured by 3 machines X, Y, Z. All three machines are operating at equal capacity. They produce defective items at the rate of 2 , 7 , 12% respectively. All items of X, Y, Z are put into 1 bin. An item is drawn at random from the bin and it turns out to be defective so what is the probability that it is produced by Y.

Ans.
Probability that item is produced by X = P(X) = 1/3
Probability that item is produced by Y = P(Y) = 1/3
Probability that item is produced by Z = P(Z) = 1/3
Probability that item is defective = P(A)
Probability that item is produced by X and is defective = P (A/X) = 0.02
Probability that item is produced by Y and is defective = P (A/Y) = 0.07
Probability that item is produced by Z and is defective = P (A/Z) = 0.12

By Bayes theorem, find probability that if item is defective it was produced by Y.
P ( Y / A ) = { P (A/Y)* P(Y) } / {P (A/X)* P(X) + P (A/Y)* P(Y) + P (A/Z)* P(Z) }
P ( Y / A ) = 0.33 ( substitute values mentioned above).