Having some issue with the concept of Z score.
When exactly do I use $Z = \frac{\bar X - u}{\sigma}$,
and when do I use Z = $Z = \frac{\bar X - u}{\frac{\sigma}{\sqrt{n}}}$.
I get very confused with in what situation should be using which Z calculation. Really appreciate it to have someone explain the concept. Cheers.
Suppose you have $X\sim N(\mu,\sigma^2)$ then you would use $Z=\frac{X-\mu}{\sigma}$.
The $Z$ score tells you how many standard deviations $X$ is from the mean.
If you took a sample of size $n$ then you might want to look at the distribution of the sample mean denoted $\overline{X}$. The central limit theorem says that $\overline{X}\sim N(\mu,\frac{\sigma^2}{n})$. This is known as the sampling distribution of means. The standard deviation of this distribution is $\frac{\sigma}{\sqrt{n}}$ and called the standard error. Hence standardizing $\overline{X}$ leads to $Z=\frac{\overline{X}-\mu}{\frac{\sigma}{\sqrt{n}}}$.
Hope this helps.