Monday 29 September 2014

Permutations andcombinations


CLICK HERE


When we talk of permutations and combinations in everyday talk we often use the two terms interchangeably. In mathematics, however, each of them has very specific meanings, and this distinction often causes problems.

In brief, the permutation of a number of objects is the number of different ways they can be ordered; i.e. which is first, second, third, etc. If you wish to choose some objects from a larger number of objects, the way you position the chosen objects is also important.

Combinations, on the other hand, one does not consider the order in which objects were chosen or placed, just which objects were chosen.
We could summarize permutations and combinations (very simplistically) as

Permutations - position important (although choice may also be important)

Combinations - chosen important,

This may help you to remember which is which.

Pictures on a wall

Suppose you have to put some pictures on the wall, and suppose you only have two pictures: A and B.

You could hang them

Order 1 : A first,then  B
 or

Order 2:B  first,then A

Not much of a choice, but it leads on to the difference between permutations and combinations.
In English we use the word "combination" loosely, without thinking if the order of things is important.

In other words:

"My fruit salad is a combination of apples, grapes and bananas" We don't care what order the fruits are in, they could also be "bananas, grapes and apples" or "grapes, apples and bananas", its the same fruit salad.

"The combination to the safe was 472". Now we do care about the order. "724" would not work, nor would "247". It has to be exactly 4-7-2.

So, in Mathematics we use more precise language:

If the order doesn't matter, it is a Combination.
If the order does matter it is a Permutation.

So, we should really call this a "Permutation Lock"!

In other words:

A Permutation is an ordered Combination.


THE IMPORTANT DIFFERENCE

As mentioned above, there is an important difference between permutations and combinations. In this case, for permutations the order of events is important: order 1 is different from order 2. For combinations, however, it does not matter which picture was hung first. In this example there are two permutations            (A, B ≠ B, A), but only one combination (A, B = B, A).

Examples


1. Permutations with replacement: Put ten (or whatever) numbers in a hat. Take one out, write down the number, put the number back in the hat, then do it again. If you do this 4 times, there are
10 x 10 x 10 x 10 = 10^4 = 10,000
different permutations. Order matters - 1234 is not the same permutation as 2134. For example, a telephone number or a lock combination (I suppose it should be called a permutation lock, then).

2,Permutations without replacement: Put ten (or whatever) numbers in a hat. Take one out, write down the number, throw the number away, then do it again. If you do this 4 times, there are
10 x 9 x 8 x 7 = 10! / (10-4)! = 5040
different permutations. Order matters - 1234 is not the same permuation as 2134 (and 2234 e.g. just cant occur). For example, there are
15 x 14 x 13 x 12 = 15! / (15-4)! = 32760
different ways you can sink the first four (of 15) numbered billiard balls.

3.Combinations without replacement: These are like permutations without replacement, except now order doesn't matter - 1234 and 2134 represent the same combination. Suppose you have 4 unique items, like these four digits. You can rearrange them in 4! ways - choose any of the 4 as the first digit, any of the remaining 3 as the second digit, and so on. (And so here is another example of a permutation without replacement!) Suppose you pick 6 of 40 numbers (without replacement) on a lottery ticket. There are 40! / (40-6)! = 93,963,542,400 permutations (!), but each permutation can be rearranged in 6! = 720 different ways, so there are only
[ 40! / (40-6)! ] / 6! = 130,504,920 combinations

If a lottery ticket costs $1, playing this lottery only makes sense from an economic perspective when the (accumulated) payout is greater than $130,504,920. If the payout was only half that, on average you'd lose 50 cents every time you played. However, many people don't see it that way. They figure that the whole dollar is lost as soon as they buy a ticket, but figure that it's well worth even the slimmest chance of winning $65 million (or even less) and buy the ticket anyway. Most governments take advantage of this discrepancy between price and value (or between exchange value and use value, if you're a Marxist), first by diverting 50% of lottery ticket sales to the state, second by taxing the winnings, usually at the highest personal income rate, and third by delivering the winnings as an annuity over 10-20 years instead of as an immediate cash payment. Together, these three measures can result in government retaining as much as 1 - 50% x 2/3 x 2/3 ~ 75% of ticket sales. (The actual number is closer to 50%; sellers of tickets keep 20-25% of the ticket price for their trouble.).

Keep learning!
Oyewole O Thomas
 

Thursday 25 September 2014

How to Solve Probability Problems on Cards

Probability is a branch of mathematics that deals with calculating the chance of a given event's occurrence, which is expressed as a number between 1 and 0. Or it is the numerical representation of an expectation.
An event with a probability of 1 can be considered a certainty: for example, the probability of a coin toss resulting in either "heads" or "tails" is 1, because there are no other options, assuming the coin lands flat.

 An event with a probability of 0.5 can be considered to have equal odds of occurring or not occurring: for example, the probability of a coin toss resulting in "heads" is 0.5, because the toss is equally as likely to result in "tails."

An event with a probability of 0 can be considered an impossibility: for example, the probability that the coin will land (flat) without either side facing up is 0, because either "heads" or "tails" must be facing up.

 A little paradoxical, probability theory applies precise calculations to quantify uncertain measures of random events.

Probability can be expressed mathematically as: the number of occurrences of a targeted event divided by the number of occurrences plus the number of failures of occurrences (this adds up to the total of possible outcomes):
p(x) = p(x)/[p(x) + p(y)]

CLICK HERE
Example
A card is drawn and replaced four times from a standard deck of 52 cards.
what is the probability of drawing a king

 a. exactly once?
b. exactly twice?
c. exactly three times?
d. exactly four times?
e. zero times?
f. Which is the most likely event(s) when drawing a card four times with replacement?

CLICK HERE
Solution:
 To figure out the answer you have to use binomial distribution.
The formula for exactly k successes in an n-trial experiment with replacement is:

(n choose k) * (probability of success)^k * (probability of failure)^(n-k)

Note that n = 4, since you have 4 trials.

Note also that the probability of success to draw a king is 1 in 13, or 1/13

A) The probability of drawing a king exactly once (k = 1) is:

(4 choose 1) * (1/13)^1 * (12/13)^3
= 4(0.0769)(0.787)
= 0.2421, or 24.2%

B) The probability of drawing a king exactly twice (k = 2) is:

(4 choose 2) * (1/13)^2 * (12/13)^2
= 6(0.0059)(0.852)
= 0.03, or 3%

C) The probability of drawing a king exactly three times (k = 3) is:

(4 choose 3) * (1/13)^3 * (12/13)^1
= 4(0.000455)(0.9231)
= .0017, or .17%

D) The probability of drawing a king exactly four times (k = 4) is:

(4 choose 4) * (1/13)^4 * (12/13)^0
= .0000035, round to 0.00004 or .004%

E) The probability of drawing a king exactly zero times (k = 0) is:

(4 choose 0) * (1/13)^0 * (12/13)^4
= 0.726, or 72.6%

F) The greatest probability is 72.6%, or never finding a king.

Note that if you were to sum all the probabilities found in part A through E, you would find that the probability is roughly equal to 1, or 100%, meaning that in your entire set you can only possibly draw a king zero, exactly one, two, three, or four times. This is a good way to check if you are correct.

Keep learning!
Oyewole O. Thomas