To do humor, you have to be smart. Stupid people can’t really be funny. Er, not intentionally, at least. And the main trait needed for humor is being able to find a surprising and/or unexpected connection between two disparate points.
Here’s an excellent example:
In reality, these points aren’t really all that disparate; however Frank J. made an unexpected connection I hadn’t seen from anyone else.
You probably won’t laugh out loud, though.