Skip to content

Instantly share code, notes, and snippets.

@JohnDeJesus22
Created November 26, 2019 19:25
Show Gist options
  • Save JohnDeJesus22/531fb6cfc14fe3c7185292c50b33a1d6 to your computer and use it in GitHub Desktop.
Save JohnDeJesus22/531fb6cfc14fe3c7185292c50b33a1d6 to your computer and use it in GitHub Desktop.
PBC applied to quiz data
import pandas as pd
from scipy.stats import pointbiserialr
# get data
data = pd.read_csv('D:\quiz-Alg2U0Quiz-standard20180510.csv')
# get continuous and dichotomous data
grades = data['Percent Correct']
question_1 = data['Q1']
# pbc of first question
pbc = pointbiserialr(question_1, grades)
print(pbc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment