30 seconds of code

Curated collection of useful Javascript snippets that you can understand in 30 seconds or less.

Project 4 of Statistics.md

## Homework 6

### 1.

Prove that $\hat \sigma^2 = \dfrac{SS_E}{(a-1)(b-1)}$ is the unbiased estimation of $\sigma^2$

Project 3 of Statistics.md

## Homework 5

### 13.13

The gamma probability density function is

$$f(y,r,\lambda) = \frac{\lambda^r}{\Gamma(r)} e^{-\lambda y} y^{r-1}, \quad\text{for } y,\lambda\geq 0$$

Show that the gamma is a member of the exponential family.

julia基于GLM包的线性回归

Project 2 of Statistics.md

### 摘要

Assignment 2 of Advanced Computational Method

## Homework 3

The Metropolis–Hastings algorithm works by generating a sequence of sample values in such a way that, as more and more sample values are produced, the distribution of values more closely approximates the desired distribution, $P(x)$. These sample values are produced iteratively, with the distribution of the next sample being dependent only on the current sample value (thus making the sequence of samples into a Markov chain). Specifically, at each iteration, the algorithm picks a candidate for the next sample value based on the current sample value. Then, with some probability, the candidate is either accepted (in which case the candidate value is used in the next iteration) or rejected (in which case the candidate value is discarded, and current value is reused in the next iteration)−the probability of acceptance is determined by comparing the values of the function $f(x)$ of the current and candidate sample values with respect to the desired distribution $P(x)$.