基礎知識
概率的定義 Axioms of Probability:
- Sample space : The set of all the outcomes of a random experiment.
- Set of events(or event space) : where each event is a set containing zero or more outcomes (i.e., is a collection of possible outcomes of an experiment).
- Probability measure: A function that satisfies the following propeties:
- for all
- If are disjoint events (i.e., whereever ), then
理解:以擲骰子爲例, 就是所有的可能出現的點數集{1, 2, 3, 4, 5, 6}, 包括了各種事件,比如{1, 2, 3, 4}, {奇數點數},{偶數點數}等等。
概率的基本屬性:
- If are a set of disjoint events such that , then .
條件概率:
is the probability measure of the event A after observing the occurrence of event B. Two events are independent if and only if or .
隨機變量
扔10次硬幣,出現的所有10個正反面(heads and tails)組合(考慮先後順序)便是樣本空間 ,比如 . 實際問題中,我們往往不關心出現某個特定正反面序列的概率,而更關心real-valued functions of outcomes,比如十次中出現正面的次數,或者連續反面的最長長度,這些函數便是random variables隨機變量。所以隨機變量是一個函數!
Random variable is a function
Discrete random variable:
Continuous random variable:
CDFs, PDFs, PMFs
1.Cumulative distribution function (CDF) is a function such that
By using this function one can calculate the probability of any event in .
Properties:
- .
- .
- .
- .
2.Probability mass function (PMF) is a function such that
Properties:
- .
- , is the set of all possible values may assume.
- .
3.Probability density functions (PDF) is the derivative of the CDF:
PDF for a continuous random variable may not always exist and for very small ,
The value of PDF at any given point is not the probability of that event, i.e, and can take on values larger than one.
Properties:
- .
- .
- .
Expectation 期望
is a discrete random variable with PMF and is an arbitrary function. In this case, can be considered a random variable, and we define the expectation or expected value of as
If is a continuous random variable with PDF , then the expected value of is defined as,
The expectation of can be thought of as a “weighted average” of the values that g(x) can taken on for different values of , where the weights are given by or . is the mean of random variable .
Properties:
- for any constant .
- for any constant .
- .
- For a discrete random variable , .
Variance 方差
The variance of a random variable is a measure of how concentrated the distribution of a random variable is around its mean:
An alternate expression:
Properties:
- for any constant .
- for an constant .
Some common random variables
Discrete random variables,以扔一次硬幣正面朝上的概率爲 爲例:
- 伯努利分佈 (where ):
- 二項式分佈 (where ):投擲 次,正面朝上的次數,
- 幾何分佈 (where ): 投擲幾次第一次出現正面朝上,
- 泊松分佈 (where ):a probability distribution over the nonnegative integers used for modeling the frequency of rare events,
Continuous random variable: - 均勻分佈 (where ): 在 和 之間均等概率,
- 指數分佈 (where ):概率密度隨着 增加減弱,
- 正態(高斯)分佈 (also known as the Gaussian distribution):
PDF and CDF of a couple of random variables:
Summary of some of the properties of these distributions:
雙隨機變量
Joint and marginal distributions 聯合和邊際分佈
Joint cumulative distribution function 聯合累積分佈函數 of and :
Properties:
and are the marginal cumulative distribution functions 邊際累積分佈函數 of .
Joint and marginal probability mass functions
Joint probability mass function : x :
Properties:
- => marginalization
is the marginal probability mass function 邊際概率質量函數 of .
Joint and marginal probability density functions
Joint probability density function:
Properties:
is the marginal probability density function 邊際概率密度函數 of .
Conditional distributions and Bayes’s rule
The conditional probability mass function of Y given X, assuming that :
The conditional probability density of Y given X, assuming that :
Bayes’s rule: derive expression for the conditional probability of one variable given another. 詳見貝葉斯決策理論
Discrete random variables and :
Continuous random variables and :
Independence 獨立
Two random variables X and Y are independent:
- If for all values of and .
- For discrete random variables:
- for all
- whenever for all
- For continuous random variables
- for all
- whenever for all
If and are independent then for any subset :
If is independent of then any function of X is indepedent of any funciton of .
Expectation and covariance 期望和協方差
Two discrete variables , and is a function on them:
For continuous random variables , , the analogous expression is
The relationship of two random variables with each other: covariance of two variables and is defined as:
we can rewrite this as:
Properties:
- (Linearity of expectation)
- If and are independent, then
- If and are independent, then
- , we say that and are uncorrelated 不相關. This is not the same thing as stating that and are uncorrelated. For example, if and , then one can show that and are uncorrelated, even though they are not independent.
- 隨機變量的 不相關 和 獨立 在定義上就是不等價的。獨立是不相關的充分不必要條件,即獨立可以推出不相關,反之不行。獨立就是兩個隨機變量相互獨立,等價於 。隨機變量uncorrelated的定義就是協方差爲0。