How to calculate number of sets in Sigma Algebra The example 1.2.2 of the book Statistical Inference by Casella and Berger states: if S has n elements, there are 2^n sets...(please see attached).
Could you please explain how the authors derived that formula? Thank you.

 A: Although I am personally a fan of the answer laid out by @gunes (+1) for its simplicity, it is worth mentioning an alternative method of proof.
The number of subsets of $S$ consisting of exactly $k$ elements is "n choose k", i.e.
$$\binom{n}{k} = \frac{n!}{k!(n-k)!}.$$
Thus the total number of subsets is given by
$$\begin{align*}
|\mathcal B| &= \sum_{k=0}^n\binom{n}{k} \\[1.2ex]
&= \sum_{k=0}^n\binom{n}{k}\times 1^k \times 1^{n-k} \\[1.2ex]
&= (1+1)^n \\[1.2ex]
&= 2^n
\end{align*}$$
where the second to last equality is due to the binomial theorem. 
A: This is called power set.
The other answers have information contained in the linked wikipedia page, though none of them surprisingly contain the term 'power set'. I think this answers a question that didn't ask but needs to know the answer to: 'What's the $\mathcal B$ called?' If Nemo knew what it was called, then Nemo wouldn't even be asking this question since Nemo would instead search google or wikipedia for 'number of elements in power set'.
A: It is the number of subsets of a given set. While constructing a subset, we have two choices for each element in the set, i.e. take it or leave it. For $n$ elements, we have $2\times2...2=2^n$ choices, so there are $2^n$ different subsets of a given set.
