Portfolio

profileBebisha
example1.docx

· Chi-Square Test (ꭓ2)

· Definition – a test to determine the various deviations expected by chance, if the hypothesis is true.

· Say you have a known distribution that you sample from. You expect to get the same distribution within your sample. This test determines the deviation from the known distribution in your sample. Genetics is a common field this is used in. There is a known probability for genotypes within a population. Chi-square can be used to determine if your sample deviates from this known genotypes distribution.

·

· Where O = the observed frequency

· E = expected frequency

· You have plants with red, yellow, and orange petals with the following genotypes and probabilities:

· RR = Red – 25%

· Rr = Orange – 50%

· rr = Yellow – 25%

· In a population of 320 you expect an observation of

· RR = 80

· Rr = 160

· rr = 80

· IF there is incomplete dominance.

· You grow these plants in your garden, this is what you see:

· RR = 65

· Rr = 189

· rr = 66

· Calculate

Observed

Expected

(O-E)2

(O-E)2/E

Red

65

80

225

2.81

Orange

189

160

841

5.25

Yellow

66

80

196

2.45

10.51

· ꭓ2 = 10.51

· Using the Critical Values of Chi Square distribution. A df of 2, p would be between 0.01 or 0.005.

· My null hypothesis is that the Observed and Expected outcomes would be equal if there is incomplete dominance.

· If my null hypothesis is true, deviations this large should only be expected 0.5-1% of the time.

· In this case, the hypothesis will be rejected because this is too unlikely that you would get these results with incomplete dominance.

· R code and example

· chisq.test(x, p = rep(1/length(x), length(x))

· x = data set

· p = probabilities for each data point in the data set

> genetest <- c(65, 189, 66)
> chisq.test(genetest, p = c(1/4, 1/2, 1/4))
	Chi-squared test for given probabilities
data:  genetest
X-squared = 10.519, df = 2, p-value = 0.005199

· Conclusion is that the probability is so small of this happening, the expected outcome is not correct. You reject the null hypothesis.