# Basics

## general definition of Probability

### 概率的物理意义

frequentist view: a long-run frequency over a large number of repetitions of an experiment.

Bayesian view: a degree of belief about the event in question.
We can assign probabilities to hypotheses like "candidate will win the election" or "the defendant is guilty"can't be repeated.

Markov & Monta Carlo + computing power + algorithm thrives the Bayesian view.

# 条件概率

e.g. Conditioning -> DIVIDE & CONCUER -> recursively apply to multi-stage problem.

P（A｜B） = $$\frac{P(A\ and\ B)}{P(B)}$$

PDF 概率密度函数

# 混合型

## valid PDF

1. non negative $$f(x)\geq0$$
2. integral to 1:
$$\int^{\infty}_{-\infty}f(x)dx=1$$

usually in GAN

# Generating function

1. PGF - Z
2. MGF - Laplace
3. CF - 傅立叶

## APPLICATION

1. branching process
2. bridge complex and probability
3. play a role in large deviation theory
## Multi variables.
joint distribution provides complete information about how multiple r.v. interact in high-dimensional space

# Order Statistics

## PDF of Order Statostic

two methods to find PDF

1. CDF -differentiate> PDF (ugly)
2. PDF*dx
###proof

## joint PDF

e.g. order statistics of Uniforms

## Mean vs Bayes'

deduction

### e.g. 拉普拉斯问题

$$P(Xn+1|Xn=1,Xn-1=1,...,X1=1)=\frac{P(Xn+1,Xn=1,Xn-1=1,...,X1=1)}{P(Xn=1,Xn-1=1,...,X1=1)}$$=An+1 在[0,1]内对A的积分/An 在[0,1]内对A的积分=$$\frac{n+1}{n+2}$$,即已知太阳从第1天到第n天都能升起，第n+1天能升起的概率接近于1.

# Monte carlo

## What does Multi-Armed Bandit means?

credit:https://iosband.github.io/2015/07/19/Efficient-experimentation-and-multi-armed-bandits.html

At first, multi-armed bandit means using
$$f^* : \mathcal{X} \rightarrow \mathbb{R}$$

1. Each arm $$i$$ pays out 1 dollar with probability $$p_i$$ if it is played; otherwise it pays out nothing.
2. While the $$p_1,…,p_k$$ are fixed, we don’t know any of their values.
3. Each timestep $$t$$ we pick a single arm $$a_t$$ to play.
4. Based on our choice, we receive a return of $$r_t \sim Ber(p_{a_t})$$.
5. ##How should we choose arms so as to maximize total expected return?##