Mendel's First Law

Problem

Figure 2. The probability of any outcome (leaf) in a probability tree diagram is given by the product of probabilities from the start of the tree to the outcome. For example, the probability that X is blue and Y is blue is equal to (2/5)(1/4), or 1/10.

Probability is the mathematical study of randomly occurring phenomena. We will model such a phenomenon with a random variable, which is simply a variable that can take a number of different distinct outcomes depending on the result of an underlying random process.

For example, say that we have a bag containing 3 red balls and 2 blue balls. If we let XX represent the random variable corresponding to the color of a drawn ball, then the probability of each of the two outcomes is given by Pr(X=red)=35Pr(X=red)=35 and Pr(X=blue)=25Pr(X=blue)=25.

Random variables can be combined to yield new random variables. Returning to the ball example, let YY model the color of a second ball drawn from the bag (without replacing the first ball). The probability of YY being red depends on whether the first ball was red or blue. To represent all outcomes of XX and YY, we therefore use a probability tree diagram. This branching diagram represents all possible individual probabilities for XX and YY, with outcomes at the endpoints ("leaves") of the tree. The probability of any outcome is given by the product of probabilities along the path from the beginning of the tree; see Figure 2 for an illustrative example.

An event is simply a collection of outcomes. Because outcomes are distinct, the probability of an event can be written as the sum of the probabilities of its constituent outcomes. For our colored ball example, let AA be the event "YY is blue." Pr(A)Pr(A) is equal to the sum of the probabilities of two different outcomes: Pr(X=blue and Y=blue)+Pr(X=red and Y=blue)Pr(X=blue and Y=blue)+Pr(X=red and Y=blue), or 310+110=25310+110=25 (see Figure 2 above).

Given: Three positive integers kk, mm, and nn, representing a population containing k+m+nk+m+n organisms: kk individuals are homozygous dominant for a factor, mm are heterozygous, and nn are homozygous recessive.

Return: The probability that two randomly selected mating organisms will produce an individual possessing a dominant allele (and thus displaying the dominant phenotype). Assume that any two organisms can mate.

Sample Dataset

2 2 2

Sample Output

0.78333

Mendel's First Law

时间: 2024-08-11 05:46:24

Mendel's First Law的相关文章

孟德尔Mendel

视频:http://v.youku.com/v_show/id_XNzg0NTQ3Njgw.html http://wenku.baidu.com/link?url=C-xkdwDM-PXAqjNG4-1dzhqgttibi5IDV5xMidQM0umW7iE0f0sy7aV3rG7F3dpXS64rqgegWRUsYldIrkJ63YwP3pwZ1vUr4YSRHu8h5O_ 孟德尔1822年7月20日出生于奥地利西里西亚,是遗传学的奠基人,被誉为现代遗传学之父.他通过豌豆实验,发现了遗传规律

CDOJ 1273 God Qing's circuital law

暴力枚举+idea.做的时候mod写错了,写成了1000000009,找了两个多小时才发现...... a[1],a[2],a[3]....a[N] b[1],b[2],b[3]....b[N] 首先需要枚举b[1]...b[N]与a[1]进行组合. 然后对a[2]...a[N]从小到大排序 对b[1],b[2],b[3]....b[N] 除当前与a[1]组合的以外,剩下的从大到小排序 然后找出每一个a[i]在不破坏a[0]最大值的情况下最大能与哪一个b[i]配对. 然后从第N个人开始往第2个人

默菲定律 [Murphy's Law]

一.关于默菲定律(Murphy's Law)   “墨菲定律”.“帕金森定律”和“彼德原理”并称为二十世纪西方文化三大发现. “墨菲定律”的原话是这样说的:If there are two or more ways to do something, and one of those ways can result in a catastrophe, then someone will do it.(如果有两种或两种以上的方式去做某件事情,而其中一种选择方式将导致灾难,则必定有人会作出这种选择.)

帕金森定律(Parkinson's Law)

帕金森定律(Parkinson's Law)是官僚主义或官僚主义现象的一种别称, 是由英国历史学家.政治学家西里尔·诺斯古德·帕金森(Cyril Northcote Parkinson)通过长期调查研究并于1958年出版了<帕金森定律>(Parkinson's Law)一书,其主要内容可分为9个方面来禅述: 1.冗员增加原理:官员数量增加与工作量并无关系,而是由两个源动因造成的.每一个官员都希望增加部属而不是对手(如“投票”):官员们彼此为对方制造工作(如行政审批,工商.税务.审计.公安,既得

Zipf&#39;s law

w https://www.bing.com/knows/search?q=马太效应&mkt=zh-cn&FORM=BKACAI 马太效应(Matthew Effect),指强者愈强.弱者愈弱的现象,广泛应用于社会心理学.教育.金融以及科学领域.马太效应,是社会学家和经济学家们常用的术语,反映的社会现象是两极分化,富的更富,穷的更穷.名字来自圣经<新约·马太福音>一则寓言:"凡有的,还要加倍给他叫他多余:没有的,连他所有的也要夺过来"."马太效应&

Erd\H{o}s-R\&#39;enyi Law

Let $0<p=1-q<1$ and $X_1,X_2,\ldots$ be an i.i.d. Bernoulli sequence with $p=\mathbb{P}(X_i=1)=1-\mathbb{P}(X_i=0)$. Denote by $S_n$ the length of the longest consectutive run of heads (i.e., $1$'s) within the first $n$ tosses. Erd\H{o}s-R\'enyi Law

Zipf’s Law

Let f(w) be the frequency of a word w in free text. Suppose that all the words of a text are ranked according to their frequency, with the most frequent word first. Zipf’s Law states that the frequency of a word type is inversely proportional to its

里特定律 - Little&#39;s Law

里特定律(Little's Law)源自排队理论,是IT系统性能建模中最广为人知的定律. 里特定律揭示了前置时间(Lead Time).在制品数量(Work In Progress, WIP)和吞吐率(Throughput)之间的关系. 前置时间 - Lead time:只请求进入到系统 与 请求验收完成之间的时间段.前置时间按照所经过的时间(分钟.小时等)来度量.一个请求可以是一个需求.一个用户故事.一个异常.物料.一个来自用户的请求等. 在制品数量 - Work in progress (W

排队理论之性能分析 - Little Law &amp;amp; Utilization Law

了解一个系统的性能一般是參考一些度量值(Metric),而怎样计算出这些Metric就是我们要讨论的.Little Law(排队理论:利特儿法则)和Utilization Law是Performance Engineering(System Engineering的一部分)经常使用的法则,它们都是数学理论,因此可作为性能计算的理论根据.具体分析两个法则超出了我个人的知识范围.因此我将只谈一下怎样应用. 在这之前我有写过存储系统性能 - 带宽计算,当中就应用到了Little Law和Utiliza