Title: Analysis of Frequencies
1Analysis of Frequencies So far --gt response
variable (Y) - continuous Now look at response
variable that is discrete/categorical eg
presence-absence or yes-no --gt ask questions
about frequencies in each category
2Chi -Square Test - compare OBSERVED frequency
of a trait to EXPECTED frequency of a trait
- by counting
- based on randomness or theory
3Testing for randomness Lets say were
interested in the ratio of females to males in
this class. Is the composition a RANDOM sample
of the UWO population?
Ho the class is a random sample of UWO
students HA the class is not a random sample of
UWO students
4I will have two observed frequencies, one for
each of females and males, And two expected
frequencies, one for each of females and males.
5Where do the frequencies come from? Observed Co
unt all females and males
Observed frequency of females
Count Females 132 Males 76 Total 208
Observed frequency of males
6Where do the frequencies come from? Expected Let
s say femalesmales at UWO is 5050, half are
females and half are males. So, in a RANDOM
sample, expect 50 female and 50 male.
Observed Expected Females 132 Males
76 Total 208
2080.5104 2080.5104
7 Observed Expected Females 132 Males
76 Total 208
104 104 208
8Therefore reject Ho, not a random sample of UWO
students
9Expected Lets say femalesmales at UWO is
6040. So, in a RANDOM sample, expect 60 female
and 40 male.
Observed Expected Females 132 Males
76 Total 208
2080.6124.8 2080.483.2
10 Observed Expected Females 132 Males
76 Total 208
124.8 83.2 208
Therefore, do not reject Ho, the class is a
random sample of UWO students
11Testing to see if your data fit a theoretical
distribution
Hardy-Weinberg expectations for Mendels Peas
Dihybrid cross testing for independent assortment
of traits
smooth-yellow 9 smooth-green 3 wrinkled-yellow
3 wrinkled-green 1
Ho The peas occur in a ratio of 9331 HA The
peas do not occur in a ratio of 9331
12Observed
Count smooth-yellow 152 smooth-green
53 wrinkled-yellow 39 wrinkled-green 6 TOTAL 25
0
13Expected
Count Expected smooth-yellow 152 0.5625250
140.625 smooth-green 53 0.187525046.875 wrink
led-yellow 39 0.187525046.875 wrinkled-green 6
0.062525015.625 TOTAL 250
9331 ---gt 9/16 3/16 3/16 1/16 0.5625
0.1875 0.1875 0.0625
14 Observed Expected O-E smooth-yellow 152 140.6
25 11.375 smooth-green 53 46.875 6.125 wrinkle
d-yellow 39 46.875 7.875 wrinkled-green 6 15.62
5 9.625 TOTAL 250 250
15Therefore, reject Ho, the sample is not in H-W
Eqm
16Often, collect data on more than one variable
simultaneously --gt contingency table
analysis --gt test for independence among the
variables
2 X 2 Contingency Tables 2 categorical
variables, each with two levels
17R1 sum of observed in Row 1 R2 sum of
observed in Row 2 C1 sum of observed in Column
1 C2 sum of observed in Column 2 C3 sum of
observed in Column 3 Total sum of all observed
18Expected calculation
/
19For example, A rare tree species can be
rooted in serpentine or non-serpentine
soil have pubescent or smooth leaves
20Is leaf morphology independent of soil type?
Ho Leaf type is independent of soil type HA
Leaf type is not independent of soil type
21Again, want to compare OBSERVED to EXPECTED
Observed
22Expected
3428/100
23Expected
3472/100
24Expected
6628/100
25Expected
6672/100
26(No Transcript)
27Therefore, do not reject Ho leaf type is
independent of soil
28For example, varieties of tiger beetles found
during four times of the year
29Ho The occurrence of tiger beetle colour types
is not dependent upon time of year HA The
occurrence of tiger beetle colour types is
dependent upon time of year
30(No Transcript)
31Therefore, reject Ho, occurrence of tiger beetle
colour type is dependent upon time of year
32Logistic Regression --gt used to describe the
relationship between Discrete Y Continuous X
Y --gt usually dichotomous or binary
33Examples of dichotomous Y variable Presence -
Absence Alive - Dead Male - Female Red -
Green
Scored as 0s and 1s
34(No Transcript)
35(No Transcript)
36(No Transcript)
37(No Transcript)
38Y -0.070.01(X)
39(No Transcript)
40(No Transcript)
41Cigs
42(No Transcript)
43(No Transcript)
44(No Transcript)
45(No Transcript)
46(No Transcript)
47(No Transcript)
48(No Transcript)
49(No Transcript)
50(No Transcript)
51(No Transcript)