Problem
Consider a collection of coin flips. One of the most natural questions we can ask is if we flip a coin 92 times, what is the probability of obtaining 51 "heads", vs. 27 "heads", vs. 92 "heads"?
Each coin flip can be modeled by a uniform random variable in which each of the two outcomes ("heads" and "tails") has probability equal to 1/2. We may assume that these random variables are independent (see “Independent Alleles”); in layman's terms, the outcomes of the two coin flips do not influence each other.
A binomial random variable takes a value of if consecutive "coin flips" result in total "heads" and total "tails." We write that .
Given: A positive integer .
Return: An array of length in which represents the common logarithm of the probability that two diploid siblings share at least of their chromosomes (we do not consider recombination for now).
考虑硬币翻转的集合。我们可以问的最自然的问题之一是,如果我们掷硬币92次,获得51个“正面”,27个“正面”和92个“正面”的概率是多少?
每次掷硬币都可以用一个统一的随机变量建模,其中两个结果(“正面”和“反面”)的概率均等于1/2。我们可以假设这些随机变量是独立的(请参阅“独立等位基因”);用外行的话来说,两次掷硬币的结果不会互相影响。
一个二项式随机变量 取值为 如果 连续的“硬币翻转”导致 总“头”和 总“尾巴”。我们写。
给定:正整数。
返回:一个数组 长度 在其中 表示 两个二倍体同胞至少共享一个概率的常用对数 他们的 染色体(我们暂时不考虑 重组)。
Sample Dataset
5
Sample Output
0.000 -0.004 -0.024 -0.082 -0.206 -0.424 -0.765 -1.262 -1.969 -3.010