Let's say I had a population of 1000 people and I wanted to know if there was a significant difference between the number of people with Disease A and the number of people with Disease B. Let's say 5 people had Disease A and 10 people had Disease B (total of 15 people with a disease).

Would the z score be:

(5/1000 - 10/1000)/(sq rt (15/1000)(985/1000)(1/1000+1/1000))

OR

(5/1000 - 10/1000)/(sq rt (15/2000)(985/1000)(1/1000+1/1000))

OR

(5/1000 - 10/1000)/(sq rt (15/2000)(985/1000)(1/1000))

or something else entirely?