Richard P. answered 04/22/21
PhD in Physics with 10+ years tutoring experience in STEM subjects
Consider a 100 g sample of the compound
element mass_in_sample Moles_in_sample ( get by dividing mass by atomic mass)
X 38.76 g 1.934
Y 19.97 g 1.289
Z 41.26 g 5.158
The smallest moles_in_sample is that for Y. So divide each Moles_in_sample by 1.289
This results in X: 1.5 , Y : 1 Z : 4
So the first version of the empirical formula is X1.5Y1Z4
Since the subscripts should be integers, multiply through by 2 to get
X3Y2Z8