Each member of a population of size n is, independently, female with probability p or male with probability 1−p. Let X be the number of the other n−1 members of the population that are the same sex as is person 1. (So X=n−1 if all n people are of the same sex.)
Find P(X=i),i=0,…,n−1

If any doubt please feel free to ask through the comments section. Thank You
Each member of a population of size n is, independently, female with probability p or male...