<jupyter_start><jupyter_text>Boxplots and paired differences=================================================Plot boxplots for FSIQ, PIQ, and the paired difference between the two:while the spread (error bars) for FSIQ and PIQ are very large, there is asystematic (common) effect due to the subjects. This effect is cancelledout in the difference and the spread of the difference ("paired" bysubject) is much smaller than the spread of the individual measures.<jupyter_code>import pandas

import matplotlib.pyplot as plt

data = pandas.read_csv('brain_size.csv', sep=';', na_values='.')

# Box plot of FSIQ and PIQ (different measures od IQ)
plt.figure(figsize=(4, 3))
data.boxplot(column=['FSIQ', 'PIQ'])

# Boxplot of the difference
plt.figure(figsize=(4, 3))
plt.boxplot(data['FSIQ'] - data['PIQ'])
plt.xticks((1, ), ('FSIQ - PIQ', ))

plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16837315130830488, 'fraction_numerical': 0.005688282138794084, 'mean_word_length': 6.2727272727272725, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '173454', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 292, 'n_tokens_neox': 272, 'n_words': 95, 'path': '_downloads/plot_paired_boxplots.ipynb', 'repo_name': 'scipy-lectures/scipy-lectures.github.com', 'size': '879'}