The word joke has a traceable history:
From Old French joque ("jest, sport, trick"), from Latin jocus ("joke, game, pastime"). Entered English ~15th century as joke or joak.
Iocus derives from PIE *yek- ("to speak, utter"), also root of jeer, jest, jocular. Sense: "something said for amusement."
The verb to joke ("to jest, make fun") appears after the noun. Shakespeare uses joke as noun (Love's Labour's Lost, 1598).
Jocular (from joculari "to jest") shares the root. "Joke" may be a back-formation or parallel development.
PIE *yaug- ("to join") gives yoke, yoga, conjugate — unrelated to jocus.
Consensus: Joke ← Old French joque ← Latin jocus ← PIE *yek- ("speak playfully").