One of the common reasons a ceiling fan makes an electrical humming noise is that the voltage the motor is receiving is too low. Many people install a dimmer switch to operate the fan with a variable speed. Replacing the switch with a compatible one usually solves the problem. However, there are other reasons the fan voltage is too low.
In older homes, a single circuit often provides power for several rooms. When the circuit supplies power for too many appliances, reducing the voltage it supplies. Test for this issue by turning off all the lights and unplugging all the other appliances on the circuit. If the humming noise stops, the wiring in the home needs upgrading. Similarly, operating two or more fans with the same wall switch limits the voltage so one or both fans make the humming noise. Providing separate wall switches usually fixes this problem.
Intermittent humming noises are often due to other high-voltage appliances that turn on automatically and reduce the line voltage. Some window air conditioners cause the fan to hum when their compressor starts operating. Intermittent hums that occur at the same time each day are sometimes due to the power provider's attempts to limit consumption and increase conservation during peak periods of use. At peak demand times, the power system grid is overloaded, reducing voltage and increasing noise. These humming noises are more difficult to fix.