Introduction to Probability & Statistics PDF
Document Details
Tags
Summary
This document introduces basic concepts of probability and statistics. It covers topics like sample space, events, union and intersection of events, conditional probability, and Venn diagrams. A good starting point for those new to probability and statistics.
Full Transcript
# Introduction to Probability & Statistics ## Probability Chance of occurrence of event. It can be represented in decimals or percentages. ## Basic Definitions **Sample space of an experiment**: Set of all possible outcomes of the experiment. It is denoted by S. **Examples:** 1. Tossing of a c...
# Introduction to Probability & Statistics ## Probability Chance of occurrence of event. It can be represented in decimals or percentages. ## Basic Definitions **Sample space of an experiment**: Set of all possible outcomes of the experiment. It is denoted by S. **Examples:** 1. Tossing of a coin Sample space S = {H,T} 2. Throwing a die S={1,2,3,4,5,6} 3. Determining the sex of a newborn child. S = {g, b} **Event**: A subset of the sample is called an event **Examples:** 1. E₁ =Φ, E₂={H}, E₃ = {T}, E₄ = {H,T} 2. E₁ = Φ, E₂= {1,3}, E₃={1,2}, E₄ = {1,2,3}..... 3. E₁ = Φ, E₂ = {g}, E₃ = {b}, E₄ = {g,b} ## Union of Events Suppose we have two events E and F. Then their union EUF is the set of all outcomes which are either in E or in F or both. **Examples:** 1. E₁UE₃ = {H,T} = S 2. E₂UE₃ = {1,2} = E₃ 3. E₃UE₄ = E₄. 4. E₂UE₃ = E₄ =S ## Intersection of Events Suppose we are having two events E and F. Then their intersection ENF is set of all outcomes which are both in E and F. **Examples:** 1. E₂NE₃ = Φ such events are called mutually exclusive events. 2. E₂NE₃ = E₂ 3. E₃NE₄ = E₃ 4. E₂NE₃ = Φ ## Complement of a Event Suppose we have an event E. Then the complement of E is E<sup>c</sup> = set of all outcomes which are not in E. **Example:** 1. E₃<sup>c</sup> = {1,2,3,4,5,6} 2. E₃<sup>c</sup> = {1,2,3} ## One event contained in another event: Suppose we have two events E and F. We say that E is contained in F (ECF) if all outcomes in E are present in F. **Example:** 1. Throwing a dice E₁CE₂CE₃CE₄ ## Conditional Probability: Suppose there are two events E and F P(E/F) = Probability that E will occur given that F has occured. **Example:** Throwing a die P(E₃/E₄) = P(E₃NE₄) / P(E₄) 2 ← 1/3 ← = P({1,2,3}) / P({1,2,3,3}) 3 1/2 ## Venn Diagram and Algebra of events: A venn diagram is a graphical representation of an experiment. Sample space is represented by a rectangle and events are represented by circles within the rectangle. <start_of_image>грамма **Union of events:** * [Venn Diagram Image Description]: Rectangle with two overlapping cirlces labeled E and F. The union of E and F is the entire shaded area of both circles. * EUF **Intersection of Events** * [Venn Diagram Image Description]: Rectangle with two overlapping cirlces labeled E and F. The intersection of E and F is the shaded area where the circles overlap. * ENF **Complement of an event:** * [Venn Diagram Image Description]: Rectangle with a single circle in the middle labeled E. The area of the rectangle not covered by the circle is shaded. * E<sup>c</sup> ## Mutually Exclusive Events: * [Venn Diagram Image Description]: Rectangle with two circles inside, not overlapping. * E * F ## One event contained in another. * [Venn Diagram Image Description]: Rectangle with two circles inside, one entirely within the other. * E * F ## Laws of Operations: **Commutative Law**: For two events E and F, EUF = FUE ENF = FNE **Associative Law**: For two events E and F, EU(FUG) = (EUF)UG EA(FNG) = (EnF)nG **Distributive Law:** (EUF)nG = (Eng)v(FNG) (EnF)UG = (EUG)n (FUG) **De Morgan's Law:** (EUF)<sup>c</sup> = ENF<sup>c</sup> (ERF)<sup>c</sup> = ECUF<sup>c</sup> ## Axioms of Probability: 1. For any event E, 0 ≤ P(E)≤1 where P(E) represents the probability of event E. 2. P(S)=1 3. Let E₁, E₂, E₃, ..., E<sub>n</sub> be mutually exclusive events. Then P(UE<sub>i</sub>) = Σ P(E<sub>i</sub>) =1 ## Example (Axiom 3) **Experiment**: Rolling of a pair of dice **E**: Sum is 2,3 or 12 **F**: Sum is 7 or 11 **Outcome E** occurs 11% of the time **Outcome F** occurs 22% of the time What % of time the outcome will be either 2,3,12, 7 or 11? **Soln**: E and F are mutually exclusive: P(E)=0.11 P(F)=0-22 P(EDF) = P(E)+P(F) = 0.11 +0.22 = 0.33 For 33 % of the time, outcome will be 2,3,7,11 or 12. These axioms are used to prove some prepositions. ## Proposition 1: For any event E, P(E)=1-P(E<sup>c</sup>) S = EVE<sup>c</sup> P(S)=1 => P(EVE<sup>c</sup>)=1 P(E) + P(E<sup>c</sup>)=1 (Axiom 3) P(E<sup>c</sup>) = 1-P(E) ## Proposition 2: For any two events E and F P(EUF) = P(E) + P(F)-P(ERF) * [Venn Diagram Image Description]: Rectangle with two overlapping circles labeled E and F. The area of the rectangle not covered by the circles is labeled I, the area of E not covered by F is labeled II, the area of F not covered by E is labeled III, and the overlap of the circles is labeled IV. * EUF=IUDUⅢ * P(EUF)=P(IVUDUⅢ) * E = IVG * P(E) = P(IVD) * = P(I)+P(Ⅱ) * F = ⅡDUⅢ * P(F) = P(Ⅱ)+P(Ⅲ) * EnF=A P(ERF) = P(Ⅱ) P(E) + P(F)-P(ENF) = P(I)+P(Ⅱ)+P(Ⅲ) ## Example (Preposition 2) 28% of American males smoke cigarettes 7% 5% smoke cigars smoke both cigars & cigarettes. P (AUC) = P(A) + P(C) - P(Anc) = 0.28 +0.07-0.05 = 0.3 **soln**: Let E be the event that a randomly chosen American male smoke cigarettes F be the event that a randomly chosen P(E) = 0.28 PCF)=0:DJ P(EMF)=0.05 P(En F²) = P(EUF) = 1-P(EUF) = 0.7 70 % of American males smoke neither cigarettes nor cigars. ## Odds of an event: Odds of an event A is defined as P(A) = P(A)=ANA P(A) 1-P(A) Odds of an event tells how much more likely event A will occur If P(A)=3/4, Find the odds of A. ## Sample Spaces with Equally Likely Outcomes: Let S be a finite sample space, say S={1,2,..., N}. Then it is possible that P(1) = P(2) = -... = PCN) = P We know that, P(S) = 1 => P(1) + P(2) +... +P(N)=1 Np = 1 P = 1/N **Ex:** Experiment of throwing a die S = {1,2,3,4,5,6} P(1) = P(2).... = P(6) = 1/6 E₁ = Ø E₂ = {1} E₃ = {1,2} P(E₁)=0 P(E₂) = 1/6 P(E₃)=2/6=1/3 For any event E in a sample space with equally likely outcomes, PCE) = No. of points in E N S = {1, 2, 3, N3 P(E) = P(vei) = P(ei) 7/N ON ## Basic Principle of Counting: Suppose two experiments are to be conducted together. Experiment I can result in m possible outcomes Experiment 2 can result in n possible outcomes Total no. of outcomes = mn ## Joan wants to arrange his books. Joan wants to arrange his books so that all the books dealing with the same subject are together on the shelf. 10 books - 4 maths, 2 history, 3 chem, 1 language No. of arrangements = 4!3!2!1! * 4! in which same subject books will be together = 6912 ## A classic Probability theory A classic probability theory consists of 6 men, 4 women. An exam is given and students are ranked accordingly. Assuming no 2 students get the same rank. (a) How many different ranks are possible? (b) P(women receive the top 4 scores). (a) 10! (b) 6!4! = 10! / AX3X2 = 10x9x8x7 / 210 = 210 ## Consider the problem of tossing two coins Consider the problem of tossing two coins- What is the probability of getting one head & one tail? S = {HH, HT, TH, TT'} Probability = 1/2 ## Number of ways of choosing a group of r objects Number of ways of choosing a group of r objects, from a given set of n objects nCr = n(n-1)(n-2)... (n-r+1) / r! = n! / (n-r)!r! ## Find the number of different groups of size 2 Find the number of different groups of size 2 that can be chosen from a set of 8 people. 8C2 = 8! / 6!2! = 8*7 / 4 = 28. ## A committee of size 5 is to be selected from a group of 6 men... A committee of size 5 is to be selected from a group of 6 men, 4 women. If the selection is made randomly what is the probability that the committee consists of 3 men, 2 women. 6C3×5C2 = (6! / (3!3!)) * (5! / (3!2!)) = 36 * 121. 15C5 = (6x5x4 x 9x8x7) / (3!2! x 2!3!4!) = 20 x 36 / 720 = 1001 / 720 ## From a set of n items, a random sample of size k is to be selected From a set of n items, a random sample of size k is to be selected. What is the probability a given item will be among the k selected. P = (1/n)×(k-1/ (n-1)) / (k / n) = (n-1)! k! (n-k)! / (k-1)! (n-k)!n! = K / n ## A fair coin is tossed 4 times A fair coin is tossed 4 times, define the sample space corresponding Also give the subsets (a) More heads than tails are obtained = 5/16 (b) Tails occur on the even numbered tosses S = {HHHH, HHHT, HHTT, HITT, HTHH, HHTH,THHH, HTHT, HTTH, TTHH, THTH, THTT, TTHT, TTTH, TTTT, THHT} ## A lot consists of 10 good articles, 4 with minor defects, 2 with major defects. A lot consists of 10 good articles, 4 with minor defects, 2 with major defects. 2 articles are choosen in random without replacement. Find the probability that (i) both are good (ii) both have major defects (iii) Atleast 1 is good (iv) Atmost 1 is good. (V) Exactly I is good (vi) Neither has major defects (vii) Neither is good (i) <sup>10</sup>C<sub>2</sub> / <sup>16</sup>C<sub>2</sub> = (2x9x8x7x6x5x4x3x2 / 2x1x8x7x6x5x4x3x2) / (16x15x14x13x12x11x10x9x8x7x6x5) / (2x1x14x13x12x11x10x9x8x7x6x5) = 2x9x8x7x6x5x4x3x2 / (16x15x14x13x12x11x10x9x8x7x6x5) = 2x9 / 16x15 = 3/8 (ii) <sup>2</sup>C<sub>2</sub> / <sup>16</sup>C<sub>2</sub> = (2x1 / 2x1) / (16x15x14x13x12x11x10x9x8x7x6x5) / (2x1x14x13x12x11x10x9x8x7x6x5) = 1 / 16 *15 = 1 / 120 (iii) <sup>4</sup>C<sub>1</sub> x <sup>6</sup>C<sub>1 </sub> + <sup>4</sup>C<sub>2 </sub> / <sup>10</sup>C<sub>2</sub> = 4x6 + (4x3 / 2x1) / (10x9 / 2x1) = (24 + 6) / 45 = 7/8 (iv) <sup>4</sup>C<sub>0</sub> x <sup>6</sup>C<sub>2 </sub> + <sup>4</sup>C<sub>1</sub> x <sup>6</sup>C<sub>1 </sub> + <sup>4</sup>C<sub>2 </sub> / <sup>16</sup>C<sub>2</sub> = 1 x (6x5 / 2x1) + 4x6 + (4x3 / 2x1) / (16x15 / 2x1) = 15 + 24 + 6 / 120 = 5/8 (V) <sup>10</sup>C<sub>1</sub> x <sup>6</sup>C<sub>1 </sub> / <sup>16</sup>C<sub>2</sub> = 10x6 / (16x15 / 2x1) = 1/2 (vi) <sup>14</sup>C<sub>2 </sub> / <sup>16</sup>C<sub>2</sub> = (14x13 / 2x1) / (16x15 / 2x1) = 91/120 (vii) <sup>6</sup>C<sub>2</sub> / <sup>16</sup>C<sub>2</sub> = (6x5 / 2x1) / (16x15 / 2x1) = 1/8 ## From 6 positive and 8 negative numbers... From 6 positive and 8 negative numbers, 4 numbers are chosen at random without replacement and multiplied. What is the probability (i) The product is positive 6C4 + 8C4 + 6C2 x 8C2 / 14C4 = (6x5 + 5x8x7x6 + 6x5 x 8x7) / (14x13x12x11) = 30 + 1680 + 1680 / 14x13x12x11 = 30+ 3360 / 14x13x12x11 = 3390 / 14x13x12 = 10.4 = 10! / 10!*4! ## 15 + 70 +.. 15 + 70 + ..... = <sup>7</sup>C<sub>2 </sub> / <sup>10</sup>C<sub>2</sub> = (7x6 / 2x1) / (10x9 / 2x1) = 42 / 45 = 0.933 420 1260 5040 10080 20160 = <sup>7</sup>C<sub>1</sub> x <sup>13</sup>C<sub>1</sub> x <sup>12</sup>C<sub>1</sub> x <sup>11</sup>C<sub>1</sub> x <sup>10</sup>C<sub>1</sub> x <sup>9</sup>C<sub>1</sub> x <sup>8</sup>C<sub>1</sub> / <sup>20</sup>C<sub>7 </sub> = 7 x 13 x 12 x 11 x 10 x 9 x 8 / 20x 19x 18x 17 x 16x 15 x 14= 4829125 / 20160 = (18x19x20x7 / 15x14x13) / 20160 = (18x19x20 / 15x14x13) / 20160 = (18x19x20 / 15x14x13) / 20160 = 4829125 / 90120= 505 / 1001. 4829125 = 714 x 13 x 12 x 11 x 10 x 9 x 8 ## Find the number of ways in which 2 consecutive integers... No. of ways in which 2 = {(1,2), (213), (3,4),... consecutive integers can be choose Cardinality of the set = n-1. Total no. of ways in which 2 tags can be choosen = nC₂ = n(n-1) / 2. Probability (consecutive intergers) = (n-1)/ nC₂ = (n-1) / ((n* (n-1)) / 2) = 2(n-1) / n(n-1) = 2/n. ## Conditional Probability P(E/F) is the probability that the event E will occur given that the event F has already occured. ## A bin contains 5 defective... A bin contains 5 defective (that immediately failed when put in use), 10 partially defective (that failed after a couple of hours) and 25 acceptable transistors. A transistor is chosen from random from the bin and put into use If it does not immediately failed what is the probability that it is acceptable? Let A be the event that the transistor is acceptable Let D be the event that the transistor is defective. Let E be the event that the transistor is partially defective D'→ Not defective (does not fail immediately) P(A/DC) = P(A ANDD<sup>c</sup>) / P(D<sup>c</sup>) = (25 / 40) / (35 / 40) = 25 / 35 = 5 / 7 => P(A/D<sup>c</sup>) = (25 * 40 / 40 * 35) = 5 / 7 ## Ms. Perez figures that there is a 30% chance... Ms. Perez figures that there is a 30% chance that her company has set up a branch office in Phoenix. If it does she is 60% certain that she will be made manager of this new operation. What is the probability that Perez will be manager of this new Phoenix branch? Let B be the event Ms. Perez's Company sets up a branch office in Phoenix Let M be the event that Ms. Perez will become manager. P(B)=0.3 P(M/B) = 0.6 P(MNB) = 0.18 P(MNB)=0.6×0.3 ## Bayes' Formula Let E and F be two events. Then P(E) = {P(E/F) P(F) + P(E/F)P(F<sup>c</sup>)} / S P(E) = P(ERF) + P(ERF<sup>c</sup>) (Since EnF and ENF<sup>c</sup> are mutually exclusive) => P(E/F)P(F) + P(E/F<sup>c</sup>) P(F<sup>c</sup>) ## An insurance company believes that people... An insurance company believes that people can be divided into two class - accident prone, not accident prone. Their statistics show that an accident prone person will have an accident within a fixed one-year period with probability 0.4 Whereas a non-accident prone person... If we assume that 30% of the population is accident prone what is the probability that a new policy owner will have an accident within a year of purchasing a policy? Let E be the event that a new policy holder meets with an accident Let A be the event that a person is accident prone. P(E) = P(E/A) P(A) + P(E/A<sup>c</sup>) P(A<sup>c</sup>) P(A)=0.3; P(A<sup>c</sup>)=0.7 P(E/A)=0.4 => 0.4×0.3 + 0.2×0.7 = 0.12+0.14 = 0.26. ## Reconsider example I and suppose that a new policy holder... Reconsider example I and suppose that a new policy holder has an accident within a year of purchasing the policy. What is the probability that she was accident prone? P(A/E) = P(A/E<sup>c</sup>) = {P(A) P(E/A)} / P(E) => 0.3×0.4 / 0.26 => 0.12 / 0.26 => 6 / 13 = 0.4615 ## A lab blood test is 99% effective in detecting... A lab blood test is 99% effective in detecting a certain disease, when it is in fact present. However, the test also gives a false (+ve) result for one of the healthy. (e) If a healthy person is tested. Then prob. of the 0.01 test result will imply he/she has a disease If a healthy population actually has the disease what is the prob. the person has the disease given that his test result was positive? Let D be the event that a person has the disease Let E be the event that a person's test result is positive P(D/E) = P(DNE) / P(E) P(E/D)=0.99 P(E/D<sup>c</sup>) = 0.01 P(D/E) = P(D)P(E/D) = (0.005) (0.99) / {P(E/D) P(D) + P(ED<sup>c</sup>) P(D<sup>c</sup>)} = (0.005) (0.99) / (0.99) (0.005) + (0.01) (0.995) = 0.3322 ## A bolt is manufactured by 3 machines A, B and C A bolt is manufactured by 3 machines A, B and C. A turns out twice as many items as B. Machines B and C produce equal no. of items. 2% of bolts produced by A and B are defective and 4% of bolts produced by C are defective. All bolts are put into one stock pile and 1 is chosen from this pile. What is the prob. that it is defective? P(A) = 2P(B) P(DA)=0.02 P(DC)=0.04 P(B)=P(C) P(DB)=0.02 P(D) = P(D/A) P(A) + P(D/B) P(B) + P(O/C) P(C) P(A)+P(B)+P(C) = P(B)=1/4, PCC)=1/4, P(A)=1/2 P(D)=0.02×0.5+0.02×0.25 +0.04×0.25 = 0.10 +0.50 +0.01 = 0.01 +0.005+0.01 = 0.025. ## An urn contains 10 white and 3 black balls... An urn contains 10 white and 3 black balls another urn contains 3 white & 5 black balls. 2 balls are drawn at random from the first urn and placed in the second urn and then one ball is taken at random from the latter. What is the probability that it is a white ball? P(W) = P(W/B₁) P(B₁) + P(W/B₂)P(B₂)+P(W/B₃) P(B₃) => <sup>5</sup>C<sub>1</sub> x <sup>10</sup>C<sub>2</sub> / <sup>13</sup>C<sub>2</sub> + <sup>5</sup>C<sub>1</sub> x <sup>3</sup>C<sub>2</sub> / <sup>13</sup>C<sub>2</sub> + <sup>10</sup>C<sub>1</sub> x <sup>3</sup>C<sub>1</sub> / <sup>13</sup>C<sub>2</sub> = 5x(10x9 / 2x1) / (13x12 / 2x1) + 5x(3x2 / 2x1) / (13x12 / 2x1) + 10x3 / (13x12 / 2x1) = 15x9 / 13x12 + 15 / 13x12 + 30 / 13x12 = 45x9 + 15 + 30 / 13x12 = 45x9 + 45 / 13x12 = 130 / 1026 = 130 / 1026 = 39 / 31. ## Let E be the event that the recorded number is 2 Let E be the event that the recorded number is 2. Let H be the event that the coin show head. Let T be the event that the coin show tail. P(E) = P(H) P (E/H) + P(T) P (E/T) = (1/2)*(1/6) + (1/2)*(1/36) = 7/72 ## A bag contains 5 balls and it is not known how many of them... A bag contains 5 balls and it is not known how many of them are white. 2 balls are drawn at random from the bag and they are noted to be white. what is the chance that all the ball in the bag are white? Let B₁ be the event where 2 balls are white Let B₂ be the event where 3 balls are white " B₃ " " " 4 " " " B₄ " " " 5 " " Let A be the event that the two balls drawn are found to be white. P(B₄/A) = P(B₄nA) / P(A) = P(B₄)P(A/B₄) / P(A) = P(B₄) P(A/B₄) / {P(B₁) P(A/B₁)+P(B₂)P(A/B₂)+P(B₃) P(A/B₃) + P(B₄)P(A/B₄)} = (1/4) * <sup>5</sup>C<sub>2</sub> / <sup>5</sup>C<sub>2 </sub> / {(1/4) * <sup>5</sup>C<sub>2</sub> / <sup>5</sup>C<sub>2</sub> + (1/4) * <sup>4</sup>C<sub>2</sub> / <sup>5</sup>C<sub>2</sub> + (1/4) * <sup>3</sup>C<sub>2</sub> / <sup>5</sup>C<sub> 2</sub> + (1/4) * <sup>2</sup>C<sub>2</sub> / <sup>5</sup>C<sub>2</sub> } = 1/4 * (5x4 / 2x1) / (5x4 / 2x1) / {1 / 4 * (5x4 / 2x1) / (5x4 / 2x1) + 1 / 4 * (4x3 / 2x1) / (5x4 / 2x1) + 1 / 4 * (3x2 / 2x1) / (5x4 / 2x1) + 1 / 4 * (2x1 / 2x1) / (5x4 / 2x1)} = (5x4 / 2x1) / {(5x4 / 2x1) + (4x3 / 2x1) + (3x2 / 2x1) + (2x1 / 2x1)} = 10 / 10 + 6 + 3 + 1 = 1/4 ## There are 3 true coins and one false coin... There are 3 true coins and one false coin with head on both sides. A coin is chosen at random and tossed 4 times, if head occurs, all the 4 times, what is the prob. that the false coin has been chosen and used? P (F) = 1/4 Let F be the event that false coin is wed Let T " " " " true " " Let H " " " " head occurs on all 4 tosses P(F/H) = P(FNH) / P(H) = P(F) P(H/F) / P(H) => P(F) P(H/F) / {P(T) P(H/T) + P(F)P(H/F)} => (1/4) x 1 / {(3/4) x (1/2)<sup>4</sup> + (1/4)x1} => 1/4 / {(3/4) x (1/16) + (1/4)x1} => 1 / {3/64+1/4} => 1 / {3+16 / 64} => 1 / {19 / 64} => 64 / 19 ## Binomial Probability Law: An urn contains a proportion p of red balls and a proposation 1-p of black balls. what is the prob. of getting k red balls in M drawings? Or what is the probability of getting k successes out of a maximum of M successes? (M drawings) **Proof:** Assume that NR balls as red and NB balls are black. (Total N balls) So we can number the balls as {1, 2, 3, ... NR, NR+1, NR+2,... N} So, sample space is S = {(Z₁Z₂Z₃ ... Z<sub>M</sub>) / Z<sub>i</sub>∈1, 2, 3, ... N; No two Z<sub>i</sub>'s are same } NR = 3, NB=4, N= 7 K=2, M=4 P(k red balls in M drawings) = NE / NM = (<sup>NR</sup>C<sub>k</sub> * <sup>NB</sup>C<sub>M-k</sub>) / <sup>N</sup>C<sub>M</sub> where NE IS the number of successful outcomes and NM is the number of ways of arranging N objects in M places. **Ex:** successful outcome The first k balls are chosen from {1,2,..., NR} and M-k balls are from { NR+1, NR+2,.... N} {(1121415), (1,2,6,7),(2,3,4,5), (2,3,6,7)} Let NR be the number of red balls, NB " " black ", Nis the total no. of balls. P[K red balls] = NE / CN/M = (<sup>NR</sup>C<sub>k</sub> * <sup>NB</sup>C<sub>M-k</sub>) / <sup>N</sup>C<sub>M</sub> where NE is the no. of successful outcomes (N/m is the no. of ways of arranging N objects in M places NR=3, NB=4, N=7, K=2, M=4 {1,2,3}, {4,5,6,77 Successful outcomes k balls should be from {1,2,3,... NR} M-k balls from {NR+1, NR+2,... N} {1,2,4,5}, {1,2,6,7}, {2,3,4,5} **Choosing successful outcomes:** 1. Select k positions out of M to place the red ballS 2. Place the NR red balls in the k positions 3. Place the NB black " " " remaining M-k positions. No. of ways of choosing successful outcomes = NE = (<sup>M</sup>C<sub>k</sub> * <sup>NR</sup>C<sub>K</sub> * <sup>NB</sup>C<sub>M-K</sub>) / K! (M-K)! = <sup>M</sup>! (<sup>NR</sup>C<sub>K</sub> * <sup>NB</sup>C<sub>M-K</sub>) / K! (M-K)! * (<sup>NR</sup>C<sub>K</sub> * <sup>NB</sup>C<sub>M-K</sub>) / (<sup>NR</sup>C<sub>K</sub> * <sup>NB</sup>C<sub>M-K</sub>) * (<sup>N</sup>C<sub>M</sub>) P[K red balls] = NE / NM = (<sup>M</sup>! (<sup>NR</sup>C<sub>K</sub> * <sup>NB</sup>C<sub>M-K</sub>) / K! (M-K)! * (<sup>NR</sup>C<sub>K</sub> * <sup>NB</sup>C<sub>M-K</sub>) / (<sup>NR</sup>C<sub>K</sub> * <sup>NB</sup>C<sub>M-K</sub>) * (<sup>N</sup>C<sub>M</sub>)) / <sup>N</sup>C<sub>M</sub> = <sup>M</sup>! (<sup>NR</sup>C<sub>K</sub> * <sup>NB</sup>C<sub>M-K</sub>) / K! (M-K)! * (<sup>N</sup>C<sub>M</sub>) = (<sup>NR</sup>C<sub>K</sub> *