# [Dr.Lib]Note:Math – 小技巧们 I

A 为定值
B 有最大值无最小值
C 有最小值无最大值
D 既无最大值也无最小值

$$\frac{1}{PR}+\frac{1}{PS}$$=$$\frac{PR+PS}{PR*PS}$$。有什么想法吗？

$$SPQR=\frac{PS*PR*sin\alpha }{2}$$

$$SPQR=\frac{d(PS+PR) }{2}$$

$$\frac{1}{PR}+\frac{1}{PS}=\frac{sin\alpha}{d}$$

PS:某颜正熙同学提出可以用梅氏定理证二维的情况， Orz

# [Dr.Lib]Note:Math – $$\Sigma \frac{1}{n^{2}}$$

## 法六：

$\sum_{i=1}^{n}\frac{1}{i^{2}}=\zeta(2)=\frac{4}{3}\sum_{n=0}^{+\infty}\frac{1}{(2n+1)^2}=\frac{4}{3}\int_{0}^{1}\frac{\log y}{y^2-1}dy$$=\frac{2}{3}\int_{0}^{1}\frac{1}{y^2-1}\left[\log\left(\frac{1+x^2 y^2}{1+x^2}\right)\right]_{x=0}^{+\infty}dy=\frac{4}{3}\int_{0}^{1}\int_{0}^{+\infty}\frac{x}{(1+x^2)(1+x^2 y^2)}dx\,dy$
$=\frac{4}{3}\int_{0}^{1}\int_{0}^{+\infty}\frac{dx\, dz}{(1+x^2)(1+z^2)}=\frac{4}{3}\cdot\frac{\pi}{4}\cdot\frac{\pi}{2}=\frac{\pi^2}{6}.$证毕。

Posted on | 评论

# [Dr.Lib]Note:Math – Iverson bracket

In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that denotes a number that is 1 if the condition in square brackets is satisfied, and 0 otherwise. More exactly,

$$[P] = \begin{cases} 1 & \text{if } P \text{ is true;} \\ 0 & \text{otherwise.} \end{cases}$$

where P is a statement that can be true or false. This notation was introduced by Kenneth E. Iverson in his programming language APL,while the specific restriction to square brackets was advocated by Donald Knuth to avoid ambiguity in parenthesized logical expressions.

The Iverson bracket converts a Boolean value to an integer value through the natural map $$\textbf{false}\mapsto 0; \textbf{true}\mapsto1$$, which allows counting to be represented as summation. For instance, the Euler phi function that counts the number of positive integers up to n which are coprime to n can be expressed by

$$\phi(n)=\sum_{i=1}^{n}[\gcd(i,n)=1],\qquad\text{for }n\in\mathbb N^+.$$

More generally the notation allows moving boundary conditions of summations (or integrals) as a separate factor into the summand, freeing up space around the summation operator, but more importantly allowing it to be manipulated algebraically. For example

$$\sum_{1\le i \le 10} i^2 = \sum_{i} i^2[1 \le i \le 10].$$

In the first sum, the index $$i$$ is limited to be in the range 1 to 10. The second sum is allowed to range over all integers, but where i is strictly less than 1 or strictly greater than 10, the summand is 0, contributing nothing to the sum. Such use of the Iverson bracket can permit easier manipulation of these expressions.

Another use of the Iverson bracket is to simplify equations with special cases. For example, the formula

$$\sum_{1\le k\le n \atop \gcd(k,n)=1}\!\!k = \frac{1}{2}n\varphi(n)$$

which is valid for n > 1 but which is off by 1/2 for n = 1. To get an identity valid for all positive integers n (i.e., all values for which $$\phi(n)$$ is defined), a correction term involving the Iverson bracket may be added:

$$\sum_{1\le k\le n \atop \gcd(k,n)=1}\!\!k = \frac{1}{2}n(\varphi(n)+[n=1])$$

-By Wikipedia https://en.wikipedia.org/wiki/Iverson_bracket

Posted on | 评论

# [Dr.Lib]Note:Bio – 为什么植物不吸收绿色光？

Via http://www.guokr.com/question/455259/

## Ans:

Via 九维空间

PS：到是有很多原子的价电子能级跃迁对应于可见光，因为一个原子核形成的中心势阱比分子里面多个原子核形成的中心势阱要浅，所以电子能级间隔会小很多。

Posted on | 评论

# 条件概率

## 定义

P(A|B) = |A∩B|/|B|

$$P(A|B) = \frac{P(A \cap B)}{P(B)}$$

## 统计独立性

$$P(A \cap B) \ = \ P(A) P(B)$$。

$$P(A|B) \ = \ P(A)$$

$$P(B|A) \ = \ P(B)$$。

## 互斥性

$$P(A \cap B) = 0$$

$$P(A) \ne 0$$，$$P(B) \ne 0$$

$$P(A\mid B) = 0$$
$$P(B\mid A) = 0$$。

## 其它

• 如果事件B的概率$$P(B) > 0$$，那么$$Q(A) = P(A|B)$$在所有事件A上所定义的函数Q就是概率测度
• 如果$$P(B)=0$$，$$P(A|B)$$没有定义。
• 条件概率可以用决策树进行计算。

(原来我的那种方法叫决策树啊……)

## 形式定义

PX|A(E)=PX(A∩E)/PX(E)。

## 贝叶斯定理

$$P(A|B) = \frac{P(B | A)\, P(A)}{P(B)}$$

# 遗传问题的计算

## Example1:

Ans:

$$\frac{1}{6}$$

$$P(C1)=P(Aa)*\frac{1}{2}=\frac{1}{3}$$

$$P(C2|C1)= \frac{1}{2}$$（此时母本必为Aa）

$$P(C2|C1)= \frac{ P(C1\bigcap C2)}{P(C1)}$$

$$P(C1\bigcap C2)=P(C2|C1) \cdot P(C1) =\frac{1}{6}$$

P(C1)和P(C2)分别为两个孩子患病的概率。P(Aa)为母本为Aa的概率。

## Example2:

Aa控制的遗传病为常染色体隐形遗传病。男子的基因型有两种可能1/3AA，2/3Aa。与基因型为Aa的正常女子结婚。生了一个正常的儿子。求这个儿子是Aa的概率。

Ans:

$$\frac{3}{5}$$

$$P(C|A\_)=\frac{P(C \bigcap A\_)}{P(A\_)}=\frac{P(AA) \cdot \frac{1}{2}+ P(Aa) \cdot \frac{1}{2}}{P(A\_)}=\frac{\frac{1}{3} \cdot \frac{1}{2}+\frac{2}{3} \cdot \frac{1}{2}}{\frac{5}{6}}=\frac{3}{5}$$

P(A_)为孩子正常的概率。P(C)为孩子为Aa的概率。P(AA)和P(Aa)是男子基因型的概率。

Posted on | 评论