# Hypothesis testing with very high z value

Bags of concrete mix labeled as containing 100 lb have a population mean weight of 100 lb and a population standard deviation of 2.551 lb. What is the probability that the mean weight of a random sample of 50 bags is less than 95 lb?

In solving this, I tried to use the formula $z = \dfrac {\bar x - \mu} {\frac {\sigma} {\sqrt n}}$, but I end up getting $z = \dfrac {95 - 100} {\frac {2.551} {\sqrt 50}} = -13.859$. This seems like a ridiculously large z score, can it possibly be right? Or am I missing something?

If it seems like a very small probability think about the likelihood of the situation. What's the probability of one bag being 95 lbs or less? Now, if you have 50, does the probability that the mean of those 50 is 95 lbs or less exceed the probability of one bag being 95 lbs or less? Don't just do the math but think about the situation and whether it's likely to happen.

If you use the stats program R it might be easy to see through simulation.

Get a sample of bags that's large (1000) from your defined population.

y <- rnorm( n = 1000, m = 100, sd = 2.551 )


Look at a histogram of that.

hist(y)


It looks very normal. Now, I've got 1000 bags of concrete all of varying weights that match the properties of what you described. I can see how many of them have a weight less than or equal to 95 lbs.

# select all of the bags weight 95 or less
bags95 <- y[ y <= 95 ]
# count how many of them there are
length(bags95)


That will vary every time, but not by much. I got 24. What proportion of that is 1000? What's the probability under the z for that if you do the calculation?

OK, that's the probability of getting one bag. Let's go back and do a different simulation. Let's see what happens when we get 1000 means of samples of 50 bags. So, I'm going to use the same population this time, drawing from an unlimited number of bags, and I need to draw 50 of them 1000 times.

# let's make a function that does our experiment,
# get some bags and return their mean.***
getBags <- function(n){
x <- rnorm(n = n, m = 100, sd = 2.551)
mean(x)}
# now let's get the bags
y <- replicate( 1000, getBags(50) )


Now you have 1000 hypothetical experiments of drawing and weighing 50 bags. What's the standard deviation of this?

sd(y)


What relationship does that value have compared to the denominator in your equation you're using to calculate your z-score in your question. And look at a histogram again. What's the range of it? Are any of the means less than or equal to 95?

Doing simulations and playing with numbers can go a long way to helping understand what's going on.

In this case it might be hard to make a distribution that contains the values you're looking for unless n is very large (and you might run out of memory on your computer first - or time generating the values). But that fact, in itself, tells you something.

** Yes R-coders I know I could have made this run much much faster by running rnorm() once, but that's memory intensive. In this case the questioner might need to make a very very large number of samples while experimenting and it's better to wait a little while for an answer than forever for a non-answer because your initial sample was to big to fit in memory. Also, it's arguably more pedagogically useful to write the code the way I've shown.

Looks good to me. You are calculating a t-score though, not a z-score. A t-score (or t statistic, T-test, etc.) reflects the probability of a given mean for a sample of population X. A z-score reflects a given score's deviation from a mean, given the standard deviation of that sample.

• Yes, it is technically a t-statistic but can be approximated by a z score for a sufficiently large n (greater than 30, according to my textbook). But how should I find the probability that the mean would be less than 95? Every table that I look in only goes up to a z score (or t-score) of about 3.5 – Chad Russell Nov 1 '12 at 5:46
• The probability is (i) effectively zero and (ii) effectively meaningless, since even very small amounts of dependence are going to have a substantive impact on the relative probability out there. I can see a bunch of ways there could be more than a small amount of dependence. If you must give a nonzero probability, as meaningless as it would be, you can always use the approximation that Mills' ratio goes to $1/x$. It looks like it has slightly more than two-significant-figure accuracy, which isn't bad. – Glen_b Nov 1 '12 at 6:39
• @user268208 It's $z$ not $t$, because $\sigma$ is given for the population. The statistic has a normal distribution, not a $t$-distribution. – Glen_b Nov 1 '12 at 6:47