If this is a small fan, it is a lot cruder than that. The one on my range hood is continuously variable by means of a potentiometer. I know of somebody who has a ceiling fan hooked up to a circuit with a light dimmer. The light dimmer will vary the speed. Yes, I told them they shouldn't do that.
Tam