# Lesson 3: Two-Way Tables: Independence and Association

### Introduction

This lesson is all about analysis of two-way tables, and it is split into several parts. We begin with the structure of the simplest two way table, a *2**×**2* table, and its corresponding joint distribution. We then consider how to extend the goodness-of-fit tests that we saw in Lesson 2. More specifically, we will learn the *Chi-squared test of independence* for two discrete binary random variables, and basic *measures of associations* such as odds-ratios and relative risk that will describe the strength of dependence between two binary random variables. We will then extend these concepts onto an *I × J* table, to analyse two discrete random variables one with *I* categories and the other one with *J* categories. In the Exact Tests section, we will consider a type of analysis for two-way tables that is applicable when the sample size is small and/or cell counts are small, and the large-sample methodology does not hold.