Presentation on theme: "A frequency distribution for two variables"— Presentation transcript:
1 A frequency distribution for two variables Cross TabsA frequency distribution for two variables
2 M&Ms Color Distribution % according to their website BrownYellowRedBlueOrangeGreenPlain1314242016Peanut121523
3 We take a sample of M&M’s and find a sample distribution to compare to the website distribution
4 My M&Ms data in counts 14 10 8 4 54 2 3 5 22 16 13 15 12 76 Brown YellowRedBlueOrangeGreenTotalPlain14108454Peanut235221613151276
5 14 of the 76 M&M’s were plain brown M&M’s YellowRedBlueOrangeGreenTotalPlain14108454Peanut23522161315127614 of the 76 M&M’s were plain brown M&M’s
6 BrownYellowRedBlueOrangeGreenTotalPlain14108454Peanut23522161315127654 of the 76 M&M’s were Plain
7 8 of the 76 M&M’s were blue 14 10 8 4 54 2 3 5 22 16 13 15 12 76 Brown YellowRedBlueOrangeGreenTotalPlain14108454Peanut2352216131512768 of the 76 M&M’s were blue
8 Probability To find the probability: N(event)/N(total) P(peanut green M&M) =N(Peanut Green)/N(Total M&M’s)
9 To find Joint Distribution, we find the probabilities of each cell by dividing by the total (76) BrownYellowRedBlueOrangeGreenTotalPlain14/7610/768/764/7654/76Peanut2/763/765/760/7622/7616/7613/7615/7612/7676
10 My M&Ms data: With Marginal Distributions BrownYellowRedBlueOrangeGreenMarg. for flavorPlain18.4126.96.36.1991.1Peanut188.8.131.528.9Marg. for color21.017.119.815.8100
11 Knowing that the M&M is green, what is the probability it was Peanut? BrownYellowRedBlueOrangeGreenTotalPlain14108454Peanut235221613151276We can focus on just the green column so the probability of Peanut is: N(Green Peanut)/N(Green) = 4/12
12 Conditional distribution of flavor for color We know the color of our M&M already, but now how is flavor distributed for this color?
13 Knowing that the M&M is Plain, what is the probability it is Yellow? BrownYellowRedBlueOrangeGreenTotalPlain14108454Peanut235221613151276We can focus on just the Plain row so the probability of Yellow is: N(Yellow Plain)/N(Plain) = 10/54
14 Conditional distribution of color for flavor We know the flavor of our M&M already, but now how is color distributed for this color?
15 Conditional distributions in general Conditional distribution of X for Y (we know Y for sure already, but we want to know the probability or % of having X be true as well):
16 Bar graphs for conditional distribution of color for both flavors
17 Joint Distribution (In white boxes) Marginal (In gray boxed) Conditional (Given color or flavor) BrownYellowRedBlueOrangeGreenMarg. for flavorPlain18.4184.108.40.2061.1Peanut220.127.116.118.9Marg. for color21.017.119.815.8100
Your consent to our cookies if you continue to use this website.