# Perform a z test for 2 proportions without knowing favorable cases

#### Ianstats

##### New Member
Hi all. I have been trying to understand how to calculate a z test for two proportions by hand. Here's how I currently do it. My data in Excel gives me the two sample sizes. Then, I use an online z test calculator.

1) I supply the 2 sample sizes
2) For sample 1, I supply a constant proportion of .50
3) I increase the proportion for sample 2 from .55 by .01 until the result is significant

Other settings:
The significance level is set to .05.
I also tell the calculator to use a two tailed hypothesis.

I looked up a formula to calculate this score by hand but I am stuck because I don't have the favorable cases to calculate each sample's proportion as well as the overall proportion. I'm not sure if I have been clear enough in my explanation because my statistics knowledge is quite limited. I have read many articles and watched youtube videos. They all seem to say that I would need the favorable cases for each sample to calculate all 3 proportions to plug into the formula. However, the online z test calculator I use does not ask for this info and still can produce an answer. Is it using a default of some sort? Here is the link to the calculator I use if that helps: https://www.socscistatistics.com/tests/ztest/default2.aspx

#### Dason

I looked up a formula to calculate this score by hand but I am stuck because I don't have the favorable cases to calculate each sample's proportion as well as the overall proportion.
I really don't understand what you're saying. Can you show what data you actually do have? That would be the most helpful information...

#### Ianstats

##### New Member
Of course. Thank you for your help. I want to use the formula below:

Z = (proportion 1 - proportion 2) - 0 / square root (overall proportion (1-overall proportion) (1/sample size 1 + 1/sample size 2)
You can find the formula here: https://www.socscistatistics.com/tests/ztest/

For the online calculator it asks for fewer details. I used:

Sample 1 = 126
Sample 2 = 108
Prop 1 = .50
Prop 2 = .63 (I increased this by .01 from .55 until the test was significant)
Significance level = .50
Hypothesis: two-tailed

Based on my research the formula I want to use will require me to calculate proportion 1, 2 and overall. Proportion 1 = favorable cases / sample size 1. Proportion 2 = favorable cases / sample size 2. Overall = total favorable cases / total sample sizes of 1 and 2 summed...I can't calculate this by hand because I don't have the favorable cases data.