Consider the two way frequency table with marginal and joint distributions of the two variables X and Y.

Here

or simply

Note. For large data, the two way frequency table is advantageous.

**Example 8.** *Calculate the correlation coefficient from the following table.*

**Solution. **Consider the following table :

The correlation coefficient is