Whether you spell it “bogie” or “bogey”, the meaning is the same.
The witch, in gypsy as in other lore, is a haunting terror of the night. It has not, that I am aware, ever been conjectured that the word Humbug is derived from the Norse hum, meaning night, or shadows (tembrce) Qon^o, “Icelandic Latin glossary in Niall’s Saga”), and bog, or bogey, termed in several old editions of the Bible a bug, or ” bugges.” And as bogey came to mean a mere scarecrow, so the hum-bugges or nightly terrors became synonymes for feigned frights. “A humbug, a false alarm, a bug-bear” (“Dean Milles MS.” Halliwell). The fact that bug is specially applied to a nocturnal apparition, renders the reason for the addition of hum very evident.
There is a great deal that is curious in this word Bogey. Bug-a-boo is suggestive of the Slavonian Bog and Buh, both meaning God or a spirit. Boo or bo is a hobgoblin in Yorkshire, so called because it is said to be the first word which a ghost or one of his kind utters to a human being, to frighten him. Hence, ” he cannot say bo to a goose.” Hence boggart, bogle, boggle, bo-guest, i.e., bar-geist, boll, boman, and, probably allied, bock (Devon), fear. Bull-beggar is probably a form of bu and bogey or boge, allied to boll (Northern), an apparition.