Question

The code presented below will allow to carry out a test of the null hypothesis. The...

The code presented below will allow to carry out a test of the null hypothesis. The first line reads in the observed frequencies (based on our sample) for each phenotype. The second and third lines allow us to obtain the expected frequencies given the hypothesized distribution. Lines 4 and 5 simply display the observed and expected frequencies. The 6th line contains the hypothesized distribution (this is what we believe it to be). The last line provides the statistical test that we need to determine whether our sample data seems consistent (or not) with the hypothesized distribution.

observed <- c(290, 100, 80, 10)

totalobs<-sum(observed)

expectedfreq<-c(totalobs*.56, totalobs*.19, totalobs*.19, totalobs*.06)

observed

expectedfreq

expecteddist<-c(.56, .19, .19, .06)

chisq.test(x = observed, p = expecteddist)

A. What is the expected frequency for phenotype 3?

B. How was the degrees of freedom calculated? i.e., show the calculation

C. Based on the Chi-squared test and using a significance level of .01, would the null hypothesis be rejected?

D. How would you explain the result of the hypothesis test to someone with a limited statistical background?

Ans:

 Phenotype Observed(O) pi Expected(E) (O-E)^2/E type 1 290 0.56 268.8 1.672 type 2 100 0.19 91.2 0.849 type 3 80 0.19 91.2 1.375 type 4 10 0.06 28.8 12.272 Total 480 1 480 16.169

A)

Expected frequency=480*pi

Expected frequency for phenotype 3 =480*0.19=91.2

B)number of categories,k=4

degrees of freedom=k-1=4-1=3

C)Chi square test statistic=16.169

p-value=CHIDIST(16.169,3)=0.0010

As,p-value<0.01,we reject the null hypothesis.

D)

There is sufficient evidence to conclude that our sample data does not seem consistent with the hypothesized distribution.