Probabilistic Models
本lec内容将会在期末考试中占比20%并且是新增内容,在去年的期末试卷中没有出现
A simple biased coin example:
You flip a coin N = 100 N = 100 N=100 times and get outcomes { x 1 , . . . , x N } \{x_1,...,x_N\} { x1,...,xN} where x i ∈ { 0 , 1 } x_i \in \{0,1\} xi∈{ 0,1} and x i = 1 x_i=1 xi=1 is interpreted as heads H H H . Suppose you had N H = 55 N_H =55 NH=55 heads and N T = 45 N_T = 45 NT=45 tails. What is the probability it will come up heads if we flip again? Let’s design a model for this scenario, fit the model. We can use the fit model to predict the next outcome.
The coin is possibly loaded. (这里的loaded指硬币不平衡,也就是正反面的概率不一样) So, we can assume that one coin flip outcome x is a Bernoulli random variable(伯努利随机变量) for some currently unknown parameter θ ∈ [ 0 , 1 ] \theta \in [0,1] θ∈[0,1]
补充: 伯努利随机变量只有两类结果(01,成功失败), 两类结果的可能性之和为1. 也就是
p ( x = 1 ∣ θ ) = θ p(x=1 \mid \theta)=\theta p(x=1∣θ)=θ and p ( x = 0 ∣ θ ) = 1 − θ p(x=0 \mid \theta)=1-\theta p(x=0∣θ)=1−θ
or more succinctly p ( x ∣ θ ) = θ x ( 1 − θ ) 1 − x i p(x \mid \theta)=\theta^x(1-\theta)^{1-x_i} p(