Z-scores for different size groups I want to know how I can calculate the Z-scores for groups with different sizes?
Let me try to explain:
We have a city with 100.000 inhabitans.
The city is divided in 10 neighborhoods, all with different size, say 1 neighborhood has 5000 inh., and another has 15.000 inh. etc.
All the inhabitans can score a Yes or No as value => we translate this to 1 or 0
So we have a mean for the city as a whole (say 26% of the city scores a yes) and whe have scores per neighborhood (neighborhood 1 = 15%, neighborhood 2 = 31% etc)
Now I want to calculate at the Z-scores for each neighborhood referenced to the city mean (26%), how do I calculate this and how about the proportions of the neighborhoods and how do I calculate the standard deviation (I need SD for Z-scores)
 A: In a comment you say you want to see if "the neighborhoods are different in z scores" but if you want to see if the neighborhoods are different, z scores are not the way to go. In his answer, BruceET made a few good suggestions.  I have one more: You can do logistic regression with "neighborhood" as an independent variable and whatever it is you are working with as a dependent variable. This lets you compare all the neighborhoods at the same time. 
A: The problem with comparing the mean of each neighbourhood with the overall mean is that the observations won't be independent. 
With this I mean that, for a comparison between neighbourhood A and the overall mean, the results from neighbourhood A are influencing the overall mean (which is not supposed to happen when doing population comparison). For that reason, as pointed out by @whuber and @BruceET, an ANOVA test is preferred.
The idea behind ANOVA is to fit a very simple type of regression model where the variables are "belonging to neighbourhood A", "belonging to neighbourhood B" and so on... Then check how much of an effect those artificial variables have
A: I think I understand the motivation of the original question because I find myself in a similar situation.
In my case I want to come up with a map visualisation that helps interpreting the data. Z-scores would give a measure on whether each neighbourhood is above or below the mean and how many standard-deviations above/below.
While this may lack scientific value (as pointed out by @whuber in the comments) it can help with the interpretation of the data. For example we could use z-scores to create a choropleth map. Coloring a map using the z-scores would allow the viewer to quickly identify which neighbourhoods are above/below the mean and how far away from it. I am not sure if it is scientific but I think it's still valuable (but please do let me know if you think this is wrong :)
However, as @MacMax was pointing out in their question, each neighbourhood would have a different population, and this may raise some issues. To illustrate let me take to the extreme.
Imagine that for a neighbourhood only 1 person participated in the survey and they answered "Yes". This tiny neighbourhood would achieve the maximum possible z-score, but it would fail to account for the fact that we have very little information (because the sample size of that neighbourhood is tiny). It would be great if in our score we could account for the sample size of each neighbourhood. I believe @MacMax was trying to find a way to deal with this issue.
The solution that I found (but I am not sure how sound this is), is based on this formula I found on wikipedia:
https://en.wikipedia.org/wiki/Standard_score#Standardizing_in_mathematical_statistics

Which is essentially the same as multiplying your z-score by the square root of n (where n is the sample size of each neighbourhood).
The caveat is that by doing so we have somewhat obscured the interpretability of the z-score value. We can still easily tell whether a neighbourhood is above (z-score > 0) or below (z-score < 0) the mean, but now is hard to tell how far away from the mean it is.
