 # Associating p-value to z-score on sampling distribution

To find our p-value for the below scenario prompted in z-scores and sampling distributions...

What's the probability of finding a sample of 30 people will a mean IQ score of less than 105?

...we're first going to calculate the z-score for a sample mean IQ score of 105, then we'll find the corresponding p-value in the z-table!

## Calculating the z-score

We're going to utilize the below formula to calculate z-score with a sampling distribution:

What do each of these variables mean?

x-bar is the sample mean that you want to obtain the z-score of.
μ is the mean value of the given population.
σ is the standard deviation of the given population’s values.
n is the sample size.

The only major difference between this formula and the one in Associating p-value to z-score with population distribution is that instead of just σ, we now have σ divided by n!

This probably looks familiar... this is the formula for Standard Error (SE) from z-scores and sampling distributions!

Your standard error (SE) will occur in the denominator of your z-score (and t-score) equations.

A super sick "a-ha" moment about standard error (if you're down to nerd-out for a second)...

When we were working with z-score in Associating p-value to z-score with population distribution, our formula for z-score was as follows:

Lemme ask you: what was our sample size in that article?

1! Because we were dealing with one, single IQ score.

And based on the z-score formula above when working with standard error (σ/sqrt(n))...

...our sample size was 1...

...any number divided by 1 equals itself...

...so we've really been working with standard error all along, even in What is a z-score, in relation to data points?!

### Plugging in the mean (μ) and standard deviation (σ)

In z-scores and normal distributions, we stated the following about the population of all IQ scores:

"Well, it is known that all IQ scores follow on a normal distribution like this...

...with a mean of 100...

...and a standard deviation of 15."

Therefore, we'll once again plug in 100 for μ...

...and 15 for σ.

### Plugging in the sample mean (x-bar)

Our prompt states that we're looking for a sample mean of less than 105...

What's the probability of finding a sample of 30 people will a mean IQ score of less than 105?

We'll handle the whole "less than" part of this later; all we need to do here for now is plug in 105 for x-bar.

### Plugging in the sample size (n)

Our prompt states that our sample size is 30...

What's the probability of finding a sample of 30 people will a mean IQ score of less than 105?

So, we'll plug in 30 for n!

### Solving for z-score

When we solve this out, we get a z-score of 1.83!

## How to associate a p-value to your z-score

This process is literally the exact same as what we did in Associating p-value to z-score with population distribution.

Using the z-table...

...find "1.8" in the left-hand column (representing 1.83)...

...and then "0.03" in the top row (representing 1.83)...

...to locate our p-value of 0.9664!

Once again... this process is literally the exact same as what we did in Associating p-value to z-score with population distribution.

Notice how at the top of the z-table, the area to the left of the "z" on the x-axis is filled in?

This corresponds to the "less than" part of our prompt. We're looking for the area under our sampling distribution to the left, or less than 105.

What's the probability of finding a sample of 30 people will a mean IQ score of less than 105?

Therefore, our p-value of 0.9664 means that on our sampling distribution, the area under the curve to the left of a sample mean IQ score of 105...

...is equal to 0.9664, or 96.64%.

In other words, to answer our original question...

What's the probability of finding a sample of 30 people will a mean IQ score of less than 105?

...the probability of finding a random sample of 30 people with a mean IQ score less than 105 is 96.64%!