A doublet is the event in which both dice show the same number. The possible outcomes when two dice are thrown are:
\[
6 \times 6 = 36 \text{ possible outcomes}.
\]
The favorable outcomes for a doublet are:
\[
(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6).
\]
Thus, there are 6 favorable outcomes. Therefore, the probability of getting a doublet is:
\[
P(\text{doublet}) = \frac{6}{36} = \frac{1}{6}.
\]
Thus, the correct answer is option (B) \( \frac{1}{6} \).