T-Tests

# Import packages
import pandas as pd
import scipy.stats as stats
%matplotlib inline

# Read in the data
data = pd.read_csv(‘Customer Support Time Study.csv’)

# Set columns to lists to use in ttest function
joe = data[‘Joey’].values.tolist()
nat = data[‘Nathaly’].values.tolist()

# Plot the means (optional)
data.mean().plot(‘bar’)

# Perform ttest
stats.ttest_ind(nat,joe,equal_var = True)

%d bloggers like this: