Given a Probability space, two events are called independent if
For random variables, they are called independent if for all , , and are independent in the above sense.
Equivalently, for all functions
See here: Chapter 2 Information Measures - Section 2.1 A Independence and Markov Chains – independence in graphical models
https://en.wikipedia.org/wiki/Conditional_independence
See here. Note that his definition is the same as in wiki. Just divide by to see this. His example at the end is rather illustrative too.