How to compare the proportion female with the proportion male I would like to know if it is correct to do the following statistical comparison: In a sample of $440$ patients, I have $241$ females ($54.8\%$) and $199$ males ($45.2\%$). Are these proportions statistically different?
I used $z$ test for independent samples. So: $z= 2.764$ (with Yates correction) and $p<0.01$. 
 A: (I'll turn my comments into an official answer.) 
Since there are only females and males in reality, once the proportion female (male) has been determined the other is determined also.  That is, these 'two' proportions are not independent of each other.  You wonder if they are equal, which means you wonder if the proportion female is 50%.  You can test this with a binomial test.  Since you don't have a theory suggesting one percentage is greater apriori, you would use a two tailed test.  
Using your data, here is a demonstration using R:  
##### test if proportion female = proportion male
binom.test(x=c(241, 199), p=0.5, alternative="two.sided")
# 
#  Exact binomial test
# 
# data:  c(241, 199)
# number of successes = 241, number of trials = 440,
# p-value = 0.05051
# alternative hypothesis: true probability of success is not equal to 0.5
# 95 percent confidence interval:
#  0.4998970 0.5949117
# sample estimates:
# probability of success 
#              0.5477273 

##### test if sample is consistent with known population
binom.test(x=c(241, 199), p=0.513, alternative="greater")
# 
#  Exact binomial test
# 
# data:  c(241, 199)
# number of successes = 241, number of trials = 440,
# p-value = 0.07922
# alternative hypothesis: true probability of success is greater than 0.513
# 95 percent confidence interval:
#  0.5074098 1.0000000
# sample estimates:
# probability of success 
#              0.5477273

