# yanguango

Nearest-Neighbor Classifier is a simple classifier to assign one test samle to one category, by finding the nearest point in train data.

Nearest is detected with the Euclidean distance, for example, the distance of two D-dimentional point $p, q$ is

Monty Hall Problem is an interesting problem, and is a great example to understand Bayes Rule.

What is Monty Hall Problem? Here is a description from Wikipedia.

Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice?

Suppose we have two datasets, have $n1$, $n2$ data separately, and we know mean and variance of each, $\mu_1$ ,$\sigma_1^2$, $\mu_2$ , $\sigma_2^2$ , then we combined the two datasets to single one, what’s the variance of the combined dataset?

I find a solution in Internet, here is the formula.

## 模块

### 基本用法

“闭包”这个词看起来很熟悉，在编程书中经常看见，但是我好像从来没真正理解这是个啥意思。今天查了很多资料，决定弄清楚这个词的含义。

1%