Rosalind第89题:Sex-Linked Inheritance

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值