# inference categorical data - hypothesis test

edited June 23

I"m trying to understand the outline for categorical data.

With regards to hypothesis testing, I'm having an issue understanding the computation for the p-value.

I'm used to using the formula Z = (xbar - M)/SE and going from there, but I can't understand the code. I know the command CDF measures accumulated area under the curve and so on, but does anyone know what the written formula is to solve for the p-value or is it the one I just referred to?

So I did Z = .13-.10/0.0265 = 1.45. The  for Z score 1.45 is .9265.

I then subtracted .9265 from 1 to get p-value 0.0735. What am I missing?

• edited June 23

@jordan said:
I"m trying to understand the outline for categorical data.

With regards to hypothesis testing, I'm having an issue understanding the computation for the p-value.

I'm used to using the formula Z = (xbar - M)/SE and going from there,

First off, I corrected a little typo that you had here. You had written Z=xbar-M/SE; I added parentheses to change it to Z=(xbar-M)/SE. That's an important difference.

I know the command CDF measures accumulated area under the curve and so on, but does anyone know what the written formula is to solve for the p-value or is it the one I just referred to?

Well, there really is no simple, written formula to compute the $p$-value. That's exactly why we use a table or we use software.

So I did Z = .13-.10/0.0265 = 1.45.
The  for Z score 1.45 is .9265.
I then subtracted .9265 from 1 to get p-value 0.0735.
What am I missing?

I'm not quite sure what you're doing here. I guess you're working on example 2? You've got the same type that you had before my correction up above and I don't think that your denominator is correct. Let's avoid rounding by just working out the whole thing at once:
$$\frac{29/211 - 1/10}{\sqrt{0.1*0.9/211}} \approx 1.81286.$$
If we look $1.81$ up in the table, we find 0.9649 yielding a $p$-value of $1-0.9649 = 0.0351$ in close agreement with the computation in our outline.

• Thanks for the help. Other than putting parenthesis in the Z formula, my only problem is my calculator not doing things in the right order. I tried to compute for solution 1.81286 a myriad of different ways and I can't get the correct solution. I understand the logic though - thank you!