sábado, 25 de abril de 2009

Counting Data Points

The solution to many statistical experiments involves being able to count the number of points in a sample space. Counting points can be hard, tedious, or both.

Fortunately, there are ways to make the counting task easier. This lesson focuses on three rules of counting that can save both time and effort - event multiples, permutations, and combinations.

Event Multiples

The first rule of counting deals with event multiples. An event multiple occurs when two or more independent events are grouped together. The first rule of counting helps us determine how many ways an event multiple can occur.

Rule 1. Suppose we have k independent events. Event 1 can be performed in n1 ways; Event 2, in n2 ways; and so on up to Event k (which can be performed in nk ways). The number of ways that these events can be performed together is equal to n1n2 . . . nk ways.

Example 1
How many sample points are in the sample space when a coin is flipped 4 times?

Solution: Each coin flip can have one of two outcomes - heads or tails. Therefore, the four coin flips can land in (2)(2)(2)(2) = 16 ways.

Example 2
A business man has 4 dress shirts and 7 ties. How many different shirt/tie outfits can he create?

Solution: For each outfit, he can choose one of four shirts and one of seven ties. Therefore, the business man can create (4)(7) = 28 different shirt/tie outfits.

Permutations

Often, we want to count all of the possible ways that a single set of objects can be arranged. For example, consider the letters X, Y, and Z. These letters can be arranged a number of different ways (XYZ, XZY, YXZ, etc.) Each of these arrangements is a permutation.

  • In general, n objects can be arranged in n(n - 1)(n - 2) ... (3)(2)(1) ways. This product is represented by the symbol n!, which is called n factorial. (By convention, 0! = 1.)
  • A permutation is an arrangement of all or part of a set of objects, with regard to the order of the arrangement. This means that XYZ is considered a different permutation than ZYX.
  • The number of permutations of n objects taken r at a time is denoted by nPr.
Rule 2. The number of permutations of n objects taken r at a time is
nPr = n(n - 1)(n - 2) ... (n - r + 1) = n! / (n - r)!

Example 1
How many different ways can you arrange the letters X, Y, and Z? (Hint: In this problem, order is important; i.e., XYZ is considered a different arrangement than YZX.)

Solution: One way to solve this problem is to list all of the possible permutations of X, Y, and Z. They are: XYZ, XZY, YXZ, YZX, ZXY, and ZYX. Thus, there are 6 possible permutations.

Another approach is to use Rule 2. Rule 2 tells us that the number of permutations is n! / (n - r)!. We have 3 distinct objects so n = 3. And we want to arrange them in groups of 3, so r = 3. Thus, the number of permutations is 3! / (3 - 3)! or 3! / 0!. This is equal to (3)(2)(1)/1 = 6.

Example 2
In horse racing, a trifecta is a type of bet. To win a trifecta bet, you need to specify the horses that finish in the top three spots in the exact order in which they finish. If eight horses enter the race, how many different ways can they finish in the top three spots?

Solution: Rule 2 tells us that the number of permutations is n! / (n - r)!. We have 8 horses in the race. so n = 8. And we want to arrange them in groups of 3, so r = 3. Thus, the number of permutations is 8! / (8 - 3)! or 8! / 5!. This is equal to (8)(7)(6) = 336 distinct trifecta outcomes. With 336 possible permutations, the trifecta is a difficult bet to win.

Combinations

Sometimes, we want to count all of the possible ways that a single set of objects can be selected - without regard to the order in which they are selected.

  • A combination is a selection of all or part of a set of objects, without regard to the order in which they were selected. This means that XYZ is considered the same combination as ZYX.
  • The number of combinations of n objects taken r at a time is denoted by nCr.
Rule 3. The number of Combinations of n objects taken r at a time is
nCr = n(n - 1)(n - 2) ... (n - r + 1)/r! = n! / r!(n - r)! = nPr / r!

Example 1
How many different ways can you select 2 letters from the set of letters: X, Y, and Z? (Hint: In this problem, order is NOT important; i.e., XY is considered the same selection as YX.)

Solution: One way to solve this problem is to list all of the possible selections of 2 letters from the set of X, Y, and Z. They are: XY, XZ, and YZ. Thus, there are 3 possible combinations.

Another approach is to use Rule 3. Rule 3 tells us that the number of combinations is n! / r!(n - r)!. We have 3 distinct objects so n = 3. And we want to arrange them in groups of 2, so r = 2. Thus, the number of combinations is 3! / 2!(3 - 2)! or 3! /2!1!. This is equal to (3)(2)(1)/(2)(1)(1) = 3.

Example 2
Five-card stud is a poker game, in which a player is dealt 5 cards from an ordinary deck of 52 playing cards. How many distinct poker hands could be dealt? (Hint: In this problem, the order in which cards are dealt is NOT important; For example, if you are dealt the ace, king, queen, jack, ten of spades, that is the same as being dealt the ten, jack, queen, king, ace of spades.)

Solution: For this problem, it would be impractical to list all of the possible poker hands. However, the number of possible poker hands can be easily calculated using Rule 3.

Rule 3 tells us that the number of combinations is n! / r!(n - r)!. We have 52 cards in the deck so n = 52. And we want to arrange them in groups of 5, so r = 5. Thus, the number of permutations is 52! / (52 - 5)! or 52! / 5!47!. This is equal to 2,598,960 distinct poker hands.


Sets and Subsets

The lesson introduces the important topic of sets, a simple idea that recurs throughout the study of probability and statistics.

Set Definitions

  • A set is a well-defined collection of objects.
  • Each object in a set is called an element of the set.
  • Two sets are equal if they have exactly the same elements in them.
  • A set that contains no elements is called a null set or an empty set.
  • If every element in Set A is also in Set B, then Set A is a subset of Set B.

Set Notation

  • A set is usually denoted by a capital letter, such as A, B, or C.
  • An element of a set is usually denoted by a small letter, such as x, y, or z.
  • A set may be decribed by listing all of its elements enclosed in braces. For example, if Set A consists of the numbers 2, 4, 6, and 8, we may say: A = {2, 4, 6, 8}.
  • The null set is denoted by {}.
  • Sets may also be described by stating a rule. We could describe Set A from the previous example by stating: Set A consists of all the even single-digit positive integers.

Set Operations

Suppose we have four sets - W, X, Y, and Z. Let these sets be defined as follows: W = {2}; X = {1, 2}; Y= {2, 3, 4}; and Z = {1, 2, 3, 4}.

  • The union of two sets is the set of elements that belong to one or both of the two sets. Thus, set Z is the union of sets X and Y.
  • Symbolically, the union of X and Y is denoted by X Y.
  • The intersection of two sets is the set of elements that are common to both sets. Thus, set W is the intersection of sets X and Y.
  • Symbolically, the intersection of X and Y is denoted by X Y.

Sample Problems

  1. Describe the set of vowels.

    If A is the set of vowels, then A could be described as A = {a, e, i, o, u}.

  2. Describe the set of positive integers.

    Since it would be impossible to list all of the positive integers, we need to use a rule to describe this set. We might say A consists of all integers greater than zero.

  3. Set A = {1, 2, 3} and Set B = {3, 2, 1}. Is Set A equal to Set B?

    Yes. Two sets are equal if they have the same elements. The order in which the elements are listed does not matter.

  4. What is the set of men with four arms?

    Since all men have two arms at most, the set of men with four arms contains no elements. It is the null set (or empty set).

  5. Set A = {1, 2, 3} and Set B = {1, 2, 4, 5, 6}. Is Set A a subset of Set B?

    Set A would be a subset of Set B if every element from Set A were also in Set B. However, this is not the case. The number 3 is in Set A, but not in Set B. Therefore, Set A is not a subset of Set B.