#note Population Genetics A Concise Guide (1)

Page 5

The number of polymorphic sites within melanogaster and fixed differences between melanogaster and erecta are summarized in the folloing table:

PolymorphicFixed
Silent132639
Replacement11011
143650

Note:

2 X 2 Contingency Chi-square calculation:

    \[\text{E}_1_1=\frac{39\times14}{50}=10.92,\quad\text{E}_1_2=\frac{39\times36}{50}=28.08,\]

    \[\text{E}_2_1=\frac{11\times14}{50}=3.08,\quad\text{E}_2_2=\frac{11\times36}{50}=7.92\]

    \[ \chi^{2}=\sum \frac{(O_i_j-E_i_j)^{2}}{E_i_j}=\frac{(13-10.92)^{2}}{10.92}+\frac{(26-28.08)^{2}}{28.08}+\frac{(1-3.08)^{2}}{3.08}+\frac{(10-7.92)^{2}}{7.92}\approx 2.5\]

P > 0.05 (degrees of freedom dof = 1), thus that the two ratios are not significantly different.

Run chi-square test in Python:

import numpy as np
from scipy.stats import chi2_contingency 
observed = np.array([[13, 26], [1, 10]])
chi_val, p_val, dof, expected =  chi2_contingency(observed,correction=False)
chi_val, p_val, dof, expected

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top