Probe it with volt meter. Could be dirty socket, bad ground connection, or partially broken wiring.