Binomial distribution for gender discrimination? I could be on the wrong path, but I'm trying to use binomial distribution to identify gender discrimination and am having issues getting consistent results based on trial size(?)... I think. Small numbers work as expected, large numbers do not.
An example that works: 16 people are hired. 2 are women. What is the chance this happened randomly? (x)=2, (n)=16, (p)=.5. Example below [from R] show what I expected.
pbinom(2, size=16, prob=0.5) 
#0.0021 -> .2% chance that there is no gender discrimination

An example that doesn't work: 1150 people are hired. 350 are women. What is the chance this happened randomly? (x)=350, (n)=1150, (p)=.5. Example below [from R] does not show what I expected.
pbinom(350, size=1150, prob=0.5) 
# 2.388788e-41 -> ?!

Thanks in advance. Any suggestions better approached please!

Before you get to the statistical mechanics this this type of test, you need to step back and make sure you remember the injunction that "correlation is not cause".  Gender discrimination is one possible cause of non-equal hiring probabilities but there are many other possible causes, most commonly involving correlation between gender and relevant skills or qualifications for the position.  Moreover, for the data in your question, we don't even have the number of applicants of each gender, so the probabilities we can estimate are not even conditional on applying for the position --- i.e., they are not "hiring probabilities" at all; they are joint probabilities of applying and then being hired.  If males and females have unequal probabilities, that does not prove gender discrimination.
For this reason, it is best to do this type of analysis by first framing it in purely statistical terms where you are testing whether or not the probability of applying-and-being-hired is the same for a male or a female.  For the data you have this would typically be done using a two-sided binomial test.$^\dagger$  Using the smaller dataset you can see from the test below that there is evidence of a non-equal joint probability for this event.  (For the larger dataset the evidence for an unequal probability is much stronger).
#Perform test for equal probability
binom.test(2, 16, conf.level = 0.99, alt = "two.sided")

            Exact binomial test

data:  2 and 16
number of successes = 2, number of trials = 16, p-value = 0.004181
alternative hypothesis: true probability of success is not equal to 0.5
99 percent confidence interval:
 0.006658398 0.462758698
sample estimates:
probability of success 
                 0.125 

Now that you have established evidence of non-equal probabilies you can have a think about what, if any, causal inferences you can make.  In particular, you will need to think about whether there is anything in the experimental setup that would allow you to reject other causal explanations for unequal probabilities (e.g., men more likely to apply, men more likely to have required skills for the position, etc.).  Without more, it would be extremely dubious to use this statistical evidence to conclude that gender discrimination has occurred.
If you would like to read more about this topic, I recommend reading some studies on gender discrimination in hiring in labour economics.  Studies on this topic typically either conduct randomised controlled trials (RCTs) using fake CVs with randomised sex assignment, or they use observational data and attempt to filter out confounding variables using regression methods.  Another method is to look at skill and qualification metrics of people within the organisation, filtering for their organisational level and other covariates, and then see if there is any residual correlation between the skills/qualifications and gender; if there is, this can suggest gender discrimination against the group with higher residual skill values (i.e., these are higher because the discrimination causes a more strict filter for hiring/promotion for people in that group).  This is quite a complicated field, and it involves much more than the kinds of gross statistical comparisons in output that are being compared here.  It generally involves deeper thinking about relationships between cause and statistical association.

$^\dagger$ Some analysts will recommend a one-sided test, since you with to test the alternative that women have a lower probability of applying-and-being-hired.  My view is that two-sided tests should be performed, so as not to bias the testing in favour of a hypothesis that might have been influenced by the data.
