Presentation is loading. Please wait.

Presentation is loading. Please wait.

A frequency distribution for two variables

Similar presentations


Presentation on theme: "A frequency distribution for two variables"— Presentation transcript:

1 A frequency distribution for two variables
Cross Tabs A frequency distribution for two variables

2 M&Ms Color Distribution % according to their website
Brown Yellow Red Blue Orange Green Plain 13 14 24 20 16 Peanut 12 15 23

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
Yellow Red Blue Orange Green Total Plain 14 10 8 4 54 Peanut 2 3 5 22 16 13 15 12 76

5 14 of the 76 M&M’s were plain brown M&M’s
Yellow Red Blue Orange Green Total Plain 14 10 8 4 54 Peanut 2 3 5 22 16 13 15 12 76 14 of the 76 M&M’s were plain brown M&M’s

6 Brown Yellow Red Blue Orange Green Total Plain 14 10 8 4 54 Peanut 2 3 5 22 16 13 15 12 76 54 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
Yellow Red Blue Orange Green Total Plain 14 10 8 4 54 Peanut 2 3 5 22 16 13 15 12 76 8 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)
Brown Yellow Red Blue Orange Green Total Plain 14/76 10/76 8/76 4/76 54/76 Peanut 2/76 3/76 5/76 0/76 22/76 16/76 13/76 15/76 12/76 76

10 My M&Ms data: With Marginal Distributions
Brown Yellow Red Blue Orange Green Marg. for flavor Plain 18.4 13.2 10.5 5.3 71.1 Peanut 2.6 3.9 6.6 28.9 Marg. for color 21.0 17.1 19.8 15.8 100

11 Knowing that the M&M is green, what is the probability it was Peanut?
Brown Yellow Red Blue Orange Green Total Plain 14 10 8 4 54 Peanut 2 3 5 22 16 13 15 12 76 We 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?
Brown Yellow Red Blue Orange Green Total Plain 14 10 8 4 54 Peanut 2 3 5 22 16 13 15 12 76 We 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)
Brown Yellow Red Blue Orange Green Marg. for flavor Plain 18.4 13.2 10.5 5.3 71.1 Peanut 2.6 3.9 6.6 28.9 Marg. for color 21.0 17.1 19.8 15.8 100


Download ppt "A frequency distribution for two variables"

Similar presentations


Ads by Google