The empirical formula of a chemical compound is the simplest whole-number ratio of atoms present in a compound.
Our compound only has C and H.
Step 1)
We assume a 100g of sample, so we have:
82.66 % C = 82.66 g C
For H) 100%-82.66% = 17.34%
Then 17.34 % H = 17.34 g H
Step 2)
Let's convert grams into moles, using each atomic mass for C and H.
For C) 82.66 g C x (1 mol C/12.01 g C) = 6.88 moles
For H) 17.34 g H x (1 mol H/1.00 g H) = 17.34 moles
Step 3)
We divide the number of moles by the smallest one of them (6.88 moles) and obtain an integer number.
For C) 6.88 moles/6.88 moles = 1
For H) 17.34 moles/6.88 moles = 2.52 = 3 (approx.)
Now, our empirical formula is C1H3 or CH3