here the "event" that produces outcomes to count is the presence or absence from the set of a letter
in the example
x might be present or absent (2 outcomes)
y might be present or absent (2 outcomes)
w might be present or absent (2 outcomes)
total = 2^3
same applies for xyzw --> 2^4 = 16
now how many sets can be formed without w?
we take into account how many sets can be formed where we surely have w and than subtract this value from the total.
let's assume w is in every set--> we would have to arrange only the other 3 letters --> xyz. so how many way can we arrange them?
x might be present or absent (2 outcomes) (we assume each one have already w inside)
y might be present or absent (2 outcomes) (we assume each one have already w inside)
z might be present or absent (2 outcomes) (we assume each one have already w inside)
total = 2^3 = 8 possible outcomes where we have always w
(example --> if x, y, and z are absent the resulting set will be {w})
how many sets DO NOT contain w?
total = 16
sets containing w = 8
16 - 8 = 8 sets do not contain w