Suppose you are correct 90% of the time.
But in a particular case of 30 questions, you only get 15 correct. What are the odds of that?
Suppose you are correct 90% of the time.
But in a particular case of 30 questions, you only get 15 correct. What are the odds of that?
If we assume that the correctness of your answers to the questions are independent (getting one question correct does not affect your chances of getting any other question correct), then (as said in Alex's answer) we can use a Binomial probability distribution to get our answer.
Here's how it works: If the correctness of your answers to each question are independent, this implies (by the laws of probability) that the probability of getting one answer right and another answer wrong is equal to the product of the probabilities of getting each answer right individually. (If $A$ and $B$ are independent events, then $P(A \cap B) = P(A) P(B)$.) If you are correct 90% of the time, and each of the thirty questions are independent, then the probability of getting a specific question right is $90\%$, and the probability of getting a specific question wrong is $100\% - 90\% = 10\%$. So any single arrangement of 15 correct answers and 15 incorrect answer has a probability equal to the product of fifteen $90\%$'s and fifteen $10\%$'s; that is:
$ P(\textrm{a specific arrangement of 15 right and 15 wrong answers}) = (90\%)^{15}(10\%)^{15}=(0.9)^{15}(0.1)^{15} $
However, there is more than one way to arrange 15 correct answers and 15 incorrect answers. (For example, instead of getting all the first fifteen right, you get the first fourteen right and the sixteenth right.) In fact, the number of arrangements of 15 correct and 15 incorrect answers out of 30 answers is $\binom{30}{15}$ (thirty choose fifteen), which equals $\frac{30!}{15! 15!} = 155\,117\,520$. Each of these arrangements is disjoint (meaning you can't get more than one arrangement at the same time), which implies (by the laws of probability) that the probability of one arrangement, or another, or another, or another (and so on until the last arrangement) is equal to the sum of the probabilities. (If $A$ and $B$ are disjoint events, then $P(A \cup B) = P(A) + P(B)$.) Each arrangement has the same probability of happening, so the probability of that one of those 15517520 arrangements occurring is the probability of a single arrangement, multiplied by 155117520. So, now, the probability of any of the 155117520 arrangements of 15 correct and 15 incorrect answers is: $ \binom{30}{15}(90\%)^{15}(10\%)^{15} = (155117520)(0.9)^{15}(0.1)^{15} = 3.193732180051435815048 \times 10^{-8} \approx 0.000000032 $
In general: The Binomial probability distributions make this a lot shorter because it puts all that stuff into one formula. The probability of getting $k$ successes (here, $k$ questions right) out of $n$ independent attempts (here, out of $n$ questions asked) with a true probability of success represented as $p$ (here, a $(100 \times p)\%$ chance of getting a question right) is:
$ \binom{n}{k} p^k (1-p)^{n-k} = \frac{n!}{k! (n-k)!} p^k (1-p)^{n-k} $
Final note: The above demonstrates the probability of getting exactly 15 right and 15 wrong. The probability of getting 15 or less right and 15 or more wrong is a slightly higher. You can get this by using the above formula (again using $n = 30$ and $p = 0.9$) for $k=15$, $k=14$, $k=13$, and so on down to $k=0$, and adding all those probabilities together (because these are also disjoint events). This probability is $3.559479269444171697124 \times 10^{-8} \approx 0.000000036$.
Binomial distribution $B(30,0.9)$
$\binom{30}{15}\left ( \frac{9}{10}\right )^{15}\left ( \frac{1}{10}\right )^{15}\approx3.19373 \cdot 10^{-8}$