170 likes | 396 Views
Cross Tabs. A frequency distribution for two variables. M&Ms Color Distribution % according to their website. We take a sample of M&M’s and find a sample distribution to compare to the website distribution. My M&Ms data in counts. 14 of the 76 M&M’s were plain brown M&M’s.
E N D
Cross Tabs A frequency distribution for two variables
We take a sample of M&M’s and find a sample distribution to compare to the website distribution
Probability • To find the probability: • N(event)/N(total) • P(peanut green M&M) = • N(Peanut Green)/N(Total M&M’s)
To find Joint Distribution, we find the probabilities of each cell by dividing by the total (76)
Knowing that the M&M is green, what is the probability it was Peanut? We can focus on just the green column so the probability of Peanut is:N(Green Peanut)/N(Green) = 4/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?
Knowing that the M&M is Plain, what is the probability it is Yellow? We can focus on just the Plain row so the probability of Yellow is:N(Yellow Plain)/N(Plain) = 10/54
Conditional distribution of color for flavor • We know the flavor of our M&M already, but now how is color distributed for this color?
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):
Bar graphs for conditional distribution of color for both flavors
Joint Distribution (In white boxes) Marginal (In gray boxed) Conditional (Given color or flavor)