#note Population Genetics A Concise Guide (7)

Page 15

Problem 1.5 Graph the ratio of the frequencies of A1A2 heterozygotes to A2A2 homozygotes as a function of q using both the exact and the approximate formulae.

Note:

Exact formula by using Python:

import numpy as np
from matplotlib import pyplot as plt
fig = plt.figure(figsize=(12, 6))
q = np.arange(0.01, 1, 0.01)
plt.plot(q, 2*(1-q)/q, color='red')
plt.xlabel('q')
plt.ylabel('2*(1-q)/q')
plt.show()

Output:

Figure 1 Exact formula: y=2p/q=2(1-q)/q

Approximate formula by using Python:

import numpy as np
from matplotlib import pyplot as plt
fig = plt.figure(figsize=(12, 6))
q = np.arange(0.01, 1, 0.01)
plt.plot(q, 2/q, color='red')
plt.xlabel('q')
plt.ylabel('2/q')
plt.show()

Output:

Figure 2 Approximate formula: y=2/q

Leave a Comment

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

Scroll to Top