perform_independence_test function

Perform a hypothesis test of independence