Problem
The conditional probability of an event given another event , written , is equal to divided by .
Note that if and are independent, then must be equal to , which results in . This equation offers an intuitive view of independence: the probability of , given the occurrence of event , is simply the probability of (which does not depend on ).
In the context of sex-linked traits, genetic equilibrium requires that the alleles for a gene are uniformly distributed over the males and females of a population. In other words, the distribution of alleles is independent of sex.
Given: An array of length for which represents the proportion of males in a population exhibiting the -th of total recessive X-linked genes. Assume that the population is in genetic equilibrium for all genes.
Return: An array of length in which equals the probability that a randomly selected female will be a carrier for the -th gene.
请注意,如果和是独立的,则 必须等于,结果为 。该方程式提供了独立性的直观视图:给定事件的发生,的概率仅是(不依赖于)的概率。
在性别相关性状的背景下,遗传平衡要求基因的等位基因在人群的男性和女性之间均匀分布。换句话说,等位基因的分布与性别无关。
给定的:一个长度数组 ,代表男性在隐性X连锁总基因中占第-th位的比例。假设 所有基因的种群都处于遗传平衡中。
返回:一个数组长度的,其中等于一个随机选择的女性将是一个概率载体为第基因
Sample Dataset
0.1 0.5 0.8
Sample Output
0.18 0.5 0.32