# Picking values from a normal distribution?

So I have the following formulas:

$\frac {\mu-\bar{x}}{\frac{\sigma}{\sqrt{n}}} \sim N(0,1)$

and

$\frac{\sum_{i=1}^n(x_i-\bar{x})^2}{\sigma^2} \sim\chi^2_{n-1}$

and given following sample:

Sample 1: 120 , 107 , 110 , 116 , 114 , 111 , 113 , 117 , 114 , 112

Assuming I can generate values from a N(0,1), how can I sample posterior values for $\mu$ ?

EDIT: I forgot to include:

$\mu|\sigma^2 \sim N(\beta, \frac{\sigma^2}{n_o})$

$\mu\,|\,x_1,x_2,....x_n\,,\,\sigma^2 \sim N(\frac {n\bar{x} + n_o\beta}{ n + n_o} \, , \frac {\sigma^2}{n + n_o})$

• Perhaps I am missing something, and I don't want to assume what your distributions are for you, but can you tell us what the likelihood of your data is, and what priors you are using? Since you ask for posterior values.
– user95564
Commented Nov 19, 2015 at 8:15

First up, your formulas don't tell us much except that

$$x \sim N(\mu,\sigma^2).$$

To sample from the posterior distribution $f(\mu|\bar{x})$ we'd need to know $\mu$'s prior $f(\mu)$. These are related with Bayes' law.

$$f(\mu|\bar{x}) = \frac{f(\bar{x}|\mu) f(\mu)}{f(\bar{x})}$$

• Sorry, question edited with the info. Commented Nov 19, 2015 at 14:07