Ben A. answered 04/24/20
PhD Student in Computer Science with 10+ years of tutoring experience
Since you are only flipping the coin 3 times, the easiest way to solve this problem is to write out the 8 possible outcomes: TTT, TTH, THT, ... etc.
From there you can see how many of them get heads 0, 1, 2, or 3 times and that gives you your distribution which you can then graph with 0, 1, 2, and 3 on the x-axis.
The expected value is the weighted average of the number of heads you expect to see: E[X] = 1 * (probability of getting 1 head) + 2 * (probability of getting 2 heads) + 3 * (probability of getting 3 heads).
Once you have the expected value, you can plug these values in to the standard equation for the variance Var[X].