Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Jupyter 데이터 분석 사례 (인코고등학교 중간고사 성적)
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 성적 데이터 분석\n",
"\n",
"인코고등학교 1학년의 중간고사 성적이 나왔습니다. 1반과 2반 두개의 반으로 구성되어 있고, 학생은 각각 6명입니다. 이 성적 데이터로 간단한 데이터 분석을 하고자 합니다. \n",
"\n",
"본 Jupyter Notebook은 보시는 것처럼 문서와 파이썬 코드가 각각 섞여서 사용됩니다. 먼저, 데이터 분석에 필요한 파이썬 모듈들을 임포트합니다. (\"#\" 는 주석표시를 의미합니다. 본 코드는 Python 3으로 작성되어 한국어 표시 등이 더 편리합니다.)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import numpy as np ## 백터, 행렬 데이터 전문 모듈 numpy\n",
"import pandas as pd ## 고수준 데이터 모델 (DataFrame) 모듈 pandas\n",
"import matplotlib.pyplot as plt ## 차트 그리기 모듈 matplotlib\n",
"import scipy.stats as stats ## 통계 등 과학용 모듈 scipy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"엑셀 파일을 불러옵니다. pandas의 read_excel 함수를 이용합니다. df라는 변수에 엑셀쉬트를 DataFrame으로 만듭니다."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>반</th>\n",
" <th>이름</th>\n",
" <th>국어</th>\n",
" <th>영어</th>\n",
" <th>수학</th>\n",
" <th>과학</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>성춘향</td>\n",
" <td>67</td>\n",
" <td>87</td>\n",
" <td>90</td>\n",
" <td>98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>이몽룡</td>\n",
" <td>45</td>\n",
" <td>45</td>\n",
" <td>56</td>\n",
" <td>98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1</td>\n",
" <td>향단이</td>\n",
" <td>95</td>\n",
" <td>59</td>\n",
" <td>96</td>\n",
" <td>88</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1</td>\n",
" <td>방자</td>\n",
" <td>65</td>\n",
" <td>94</td>\n",
" <td>89</td>\n",
" <td>98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1</td>\n",
" <td>월매</td>\n",
" <td>45</td>\n",
" <td>65</td>\n",
" <td>78</td>\n",
" <td>98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>1</td>\n",
" <td>변학도</td>\n",
" <td>78</td>\n",
" <td>76</td>\n",
" <td>98</td>\n",
" <td>89</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>2</td>\n",
" <td>홍길동</td>\n",
" <td>87</td>\n",
" <td>67</td>\n",
" <td>65</td>\n",
" <td>56</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>2</td>\n",
" <td>임꺽정</td>\n",
" <td>89</td>\n",
" <td>98</td>\n",
" <td>78</td>\n",
" <td>78</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>2</td>\n",
" <td>전우치</td>\n",
" <td>100</td>\n",
" <td>78</td>\n",
" <td>56</td>\n",
" <td>65</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>2</td>\n",
" <td>일지매</td>\n",
" <td>99</td>\n",
" <td>89</td>\n",
" <td>87</td>\n",
" <td>87</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>2</td>\n",
" <td>심청</td>\n",
" <td>98</td>\n",
" <td>45</td>\n",
" <td>56</td>\n",
" <td>54</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>2</td>\n",
" <td>콩쥐</td>\n",
" <td>65</td>\n",
" <td>89</td>\n",
" <td>87</td>\n",
" <td>78</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 반 이름 국어 영어 수학 과학\n",
"0 1 성춘향 67 87 90 98\n",
"1 1 이몽룡 45 45 56 98\n",
"2 1 향단이 95 59 96 88\n",
"3 1 방자 65 94 89 98\n",
"4 1 월매 45 65 78 98\n",
"5 1 변학도 78 76 98 89\n",
"6 2 홍길동 87 67 65 56\n",
"7 2 임꺽정 89 98 78 78\n",
"8 2 전우치 100 78 56 65\n",
"9 2 일지매 99 89 87 87\n",
"10 2 심청 98 45 56 54\n",
"11 2 콩쥐 65 89 87 78"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.read_excel('성적표.xlsx')\n",
"df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"엑셀쉬트를 잘 읽어들였고, 또 화면에 잘 표시합니다. \n",
"\n",
"여기에 기본적인 통계인 총점과 평균을 추가해서, 평균으로 정렬해보겠습니다."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>반</th>\n",
" <th>이름</th>\n",
" <th>국어</th>\n",
" <th>영어</th>\n",
" <th>수학</th>\n",
" <th>과학</th>\n",
" <th>총점</th>\n",
" <th>평균</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>2</td>\n",
" <td>일지매</td>\n",
" <td>99</td>\n",
" <td>89</td>\n",
" <td>87</td>\n",
" <td>87</td>\n",
" <td>362</td>\n",
" <td>90.50</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1</td>\n",
" <td>방자</td>\n",
" <td>65</td>\n",
" <td>94</td>\n",
" <td>89</td>\n",
" <td>98</td>\n",
" <td>346</td>\n",
" <td>86.50</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>2</td>\n",
" <td>임꺽정</td>\n",
" <td>89</td>\n",
" <td>98</td>\n",
" <td>78</td>\n",
" <td>78</td>\n",
" <td>343</td>\n",
" <td>85.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>성춘향</td>\n",
" <td>67</td>\n",
" <td>87</td>\n",
" <td>90</td>\n",
" <td>98</td>\n",
" <td>342</td>\n",
" <td>85.50</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>1</td>\n",
" <td>변학도</td>\n",
" <td>78</td>\n",
" <td>76</td>\n",
" <td>98</td>\n",
" <td>89</td>\n",
" <td>341</td>\n",
" <td>85.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1</td>\n",
" <td>향단이</td>\n",
" <td>95</td>\n",
" <td>59</td>\n",
" <td>96</td>\n",
" <td>88</td>\n",
" <td>338</td>\n",
" <td>84.50</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>2</td>\n",
" <td>콩쥐</td>\n",
" <td>65</td>\n",
" <td>89</td>\n",
" <td>87</td>\n",
" <td>78</td>\n",
" <td>319</td>\n",
" <td>79.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>2</td>\n",
" <td>전우치</td>\n",
" <td>100</td>\n",
" <td>78</td>\n",
" <td>56</td>\n",
" <td>65</td>\n",
" <td>299</td>\n",
" <td>74.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1</td>\n",
" <td>월매</td>\n",
" <td>45</td>\n",
" <td>65</td>\n",
" <td>78</td>\n",
" <td>98</td>\n",
" <td>286</td>\n",
" <td>71.50</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>2</td>\n",
" <td>홍길동</td>\n",
" <td>87</td>\n",
" <td>67</td>\n",
" <td>65</td>\n",
" <td>56</td>\n",
" <td>275</td>\n",
" <td>68.75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>2</td>\n",
" <td>심청</td>\n",
" <td>98</td>\n",
" <td>45</td>\n",
" <td>56</td>\n",
" <td>54</td>\n",
" <td>253</td>\n",
" <td>63.25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>이몽룡</td>\n",
" <td>45</td>\n",
" <td>45</td>\n",
" <td>56</td>\n",
" <td>98</td>\n",
" <td>244</td>\n",
" <td>61.00</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 반 이름 국어 영어 수학 과학 총점 평균\n",
"9 2 일지매 99 89 87 87 362 90.50\n",
"3 1 방자 65 94 89 98 346 86.50\n",
"7 2 임꺽정 89 98 78 78 343 85.75\n",
"0 1 성춘향 67 87 90 98 342 85.50\n",
"5 1 변학도 78 76 98 89 341 85.25\n",
"2 1 향단이 95 59 96 88 338 84.50\n",
"11 2 콩쥐 65 89 87 78 319 79.75\n",
"8 2 전우치 100 78 56 65 299 74.75\n",
"4 1 월매 45 65 78 98 286 71.50\n",
"6 2 홍길동 87 67 65 56 275 68.75\n",
"10 2 심청 98 45 56 54 253 63.25\n",
"1 1 이몽룡 45 45 56 98 244 61.00"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"subjects = ['국어', '영어', '수학', '과학']\n",
"df['총점'] = df[subjects].sum(axis=1)\n",
"df['평균']= df['총점'] / len(subjects)\n",
"df.sort_values(['평균'], ascending=[False])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"일지매가 전교 1등이네요. \n",
"\n",
"총점으로 막대그래프를 그려볼까요? 그래프를 그리기전, matplotlib에서 한국어가 잘 표시되기 위해 다음을 실행합니다. (OS X에서 테스트 중인데, 기본 폰트에 한국어가 없나봅니다.)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import matplotlib\n",
"matplotlib.rc('font', family='AppleGothic')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"자료를 평균으로 내림차순 정렬하고, 각 데이터의 이름을 `이름` 필드를 사용하도록 한 후, 막대그래프를 그려봅니다. "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x10e927358>"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAeUAAAElCAYAAADa2PrWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmUZVV99vHv0zSDI2gciFPw1TgmDtFEMTGWM0aNOEZM\n4kAU9Q3oMg4xmlc7SpwgahyimDiiOEWjYgQUoZwiGA0LRSMmGmfBKIKKig39e//Y53ZfiqJpuqru\n2XX7+1mrVt17btU5v7r31HnOsPc+qSokSdL4NoxdgCRJagxlSZI6YShLktQJQ1mSpE4YypIkdcJQ\nliSpE4ayJEmduFyhnOSZSQ6Zer5/klOSnJrkqCQbpl57XJLPDl9PXM2iJUmaRzsUykmuk+TTwFOm\npm0EXgQcUFV3AM4AnjC8dvNh+u2r6vbAQpJbrHr1kiTNkR0K5ar6blXtDzx9avIBwHFVde7w/LXA\nQ4bHfwYcMfWzLwUOXmGtkiTNtct7TTlTj28MnDl5UlWbgY3LvQb8F3CjnSlQkqRdxUoaegVYOnB2\n7cBrkiRpGRsv+0cu1deAm02eJNkduHB4+lXgJsBnhuc3Af576QySGNSSpF1OVWW56Ss5Uj4euF+S\nfYbnBwPvGh4fDTwNIEmAQ4E3XEphq/L13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XFUdOnZhHTq9qs4BjgVI\nctWhkdydxy2rSxdk2018SHI71vimHeu5S9SVaUcRe9MaeDxjLc/zr1dpd2B5PW1Q/vOAxy251ja6\nJNetqu90UMcC7ZReaC0tA3y9qkY9Gk2yp+v25TOcqr56Vf1w7Fp6l+Q3ao3uDbzepd1L/UhazuxG\nu1z01Kr61nZ/cSXLXK+hLEnSvNmlr7FIktQTQ1mSpE4YypIkdcJQliSpE+u5S5Sky2kY1vRnVXXM\n8PyjtC4em2mDtuwG7FtVvzVeldKuy1CW5tDQleMo2sAj3wQOGe6jfQGXHFu8aNuC3WgBbZcMaSSG\nsjSfjgQOraqvDncCOgR4FS2U95j6uQuB+0893w1Hw5NGYyhL82nvyShEtDtLvZYWylu4eFuSE4En\nDdMvGl7bjRbqkmbMUJbm0/SNBSZ3BGL4niT3oI2b/XMuOWzg7knuBRxZVR9e80olbWUoS/PpnCS3\nG26w8SDaLeegHQmnqk6kHSVfQpKMeI9taZdmKEvz6anAG4c7gH0TePwwfQNTp6+TfBr4Be3U9RZa\nI7DfBPadabWSAENZmkvDgPn3WOalDVy89fXXq+qg6R9I8m6PlqVxGMrSruVc2h2wJm6e5GTadecL\naduE3wT2ol1vljRD3iVK2oV5RCz1xVCWJKkTjn0tSVInDGVJkjphKEuS1AlDWZKkThjKkiR1wlCW\nJKkT/x/Ma7iRvWD2igAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x10e96a278>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"sorted_df = df.sort_values(['평균'], ascending=[False])\n",
"sorted_df.index = sorted_df['이름']\n",
"sorted_df['평균'].plot(kind='bar', figsize=(8, 4))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"막대그래프로 평균점수를 보니까, 2위 그룹들이 비슷비슷하네요. 일지매는 방심하면 안되겠네요."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1반과 2반의 점수 비교\n",
"\n",
"그럼 이번에는 1반과 2반중 어느반이 더 잘했나 볼까요? 담임선생님들 이것에 민감하죠?"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(79.041666666666671, 77.125)"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"일반 = df[df['반'] == 1]\n",
"이반 = df[df['반'] == 2]\n",
"일반평균 = 일반['총점'].sum() / (6 * 4)\n",
"이반평균 = 이반['총점'].sum() / (6 * 4)\n",
"일반평균, 이반평균"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1반이 평균이 높네요. (파이썬 3은 변수명을 한국어로 쓸 수 도 있습니다. \"1반\" 이라고 변수를 쓰고 싶었지만, 파이썬 변수 명명 규칙이 숫자로 시작하면 안되기 때문에 그냥 저렇게 표시합니다.) \n",
"\n",
"1반 선생님 좋아합니다. 그걸 보고있던 2반 선생님이 \"별 차이도 안나는구먼 뭘\" 이라고 합니다. \n",
"\n",
"정말 두 반의 평균은 차이가 없는 걸까요? 서로 독립적인 두 집단에서 얻어진 수치형 자료로 부터 두 집단의 차이가 유의한지를 파악하는데는 독립표본 [t-검정](https://en.wikipedia.org/wiki/Student%27s_t-test) (two independent sample t-test)이 유용합니다. scipy의 ttest_ind 함수를 이용하여 바로 계산이 가능합니다."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"Ttest_indResult(statistic=0.31996022820984599, pvalue=0.755583336185639)"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"stats.ttest_ind(일반['평균'], 이반['평균'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`p value > 0.005` 이므로 두 집단이 차이가 없다는 영가설을 채택합니다. 즉 1반과 2반은 사실 유의한 점수차이가 없습니다. 오차수준에 의한 차이라고 봐야겠네요. 1반 선생님 그렇게 좋아하시면 아니될 듯.\n",
"\n",
"혹시 과목별로는 차이가 있을까요? 과목별로도 확인해보겠습니다."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"국어 Ttest_indResult(statistic=-2.490140665442242, pvalue=0.031982494983816424)\n",
"영어 Ttest_indResult(statistic=-0.61569071526315811, pvalue=0.55185337815288071)\n",
"수학 Ttest_indResult(statistic=1.4961318778859336, pvalue=0.1654958420079056)\n",
"과학 Ttest_indResult(statistic=4.3284425553317547, pvalue=0.0014931977711732465)\n"
]
}
],
"source": [
"for subject in subjects:\n",
" print(subject, stats.ttest_ind(일반[subject], 이반[subject]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"과학 과목은 p value < 0.005 입니다. 차이가 많이 나네요. 평균이 어떻길래."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(94.833333333333329, 69.666666666666671)"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"일반['과학'].sum() / 6, 이반['과학'].sum() / 6"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"역시 차이가 많이 났군요. 1반 학생들은 과학에 소질이 많은 것 같습니다. \n",
"\n",
"## 과목별 비교 \n",
"\n",
"과목별로 다른 특징이 있는 것 같습니다. 먼저 전체 데이터를 막대그래프로 그려보겠습니다. 앞서 그렸던 성적별 막대그래프를 과목별로 각각 그려보겠습니다. "
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x10ea60978>"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAlQAAAGUCAYAAADzmLwAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X2cXG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EmSKjJQSZKkpkbryN6qWysn5t6c/l8L\nFizgtttua9lrg9MmSGqT2b29rOrr22j5rBkzuHP16jZUJGmk0SbUbt3vbz4x92iOOeYY7rrrLrq7\nu+nu7h5avn79eu6//35uuOGGoWXLli3jwgsvZLvttuOkk07iuc997tBzAwMDdHW1tk3JQCWpLVb1\n9TUfb9QkZEkSwNKlS5su//nPf86pp5469PjKK6/k/PPP5+KLL2bNmjUcffTRXHLJJcyaNQsoWrOG\nB7JW8JSfJEnqaD/+8Y/Zf//9hx4vWbKEM844g5122ok999yT9773vSxZsmTo+fEIVLZQSZKkWlu+\nfDmLFy9m2223pauri+7ubgYGBli/fv3QRJw9PT0sW7aMj370o9x2223svffeQz+/3377sWzZsqHH\nBipJtdbbO7vsc/GoGTNmsXr1ne0pSNKkMG/ePA499NANQtAnPvEJtt9+e44//vimP7N+/foNHg8M\nDHDIIYfw8MMPc/vtt7e8Rk/5SWqZRzuwPnobGbAkaUuMbFFqXCammb322otrr7126PENN9zAHnvs\nwXe/+12uv/56DjzwwJbXZwuVJEmqvf7+fg455BB6enrITB566CG22WYbvvjFL/Lggw9y0EEH8a//\n+q8ALFy4kJNPPplnPetZDA4OcuaZZ27QoX1k61UrGKjaqHfXXvru3nhE04xdZrD6LoeNS5LU0NPT\ns0Gr03A33XQTZ5999tDjefPm8Y53vIMjjjiCadOmcdppp23Qp2pgYICBgYGW1megaqO+u/uaXmC4\nb5HDxiVJ7TdjxqzNnitqc39/K0QEg4ODGyw79thjOfbYY5uub6CSJEkTplMGlETEZk3U2d3dvVkz\nq4+FgUqSJHW0ZzzjGZx//vljXn/58uUtr8FRfpIkSRUZqCRJkioyUEmSJFVkoJIkSarIQCVJklSR\ngUqSJKkiA5UkSWqqd9deImLcbr279ras1pe//OX87ne/G9O6CxYs4LbbbmvZa4PzUEmSpFGMdkWP\nlv3+zbwyyOmnn87KlSvp7u7mSU96Eh//+MfZZpttgOJiycMvoLxs2TIuvPBCtttuO0466SSe+9zn\nDj03MDCw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kdpXfmTCJi\n3G69M2e2pM7rrruO173udWNa95prruGEE05oyesO14qQ8ybgRuAiYD/gAuCrQI7lhxctWjR0f+7c\nucydO7cFJUmSpKr6fvMbWL58/H7/vHljXve8887jggsuGLou3+DgIAMDA1x//fV0d3czbdq0Ddb/\n1a9+xZvf/GZ6enrYaaeduPjii3nkkUfo6uqip6dnTK+5YsUKVqxYMaZ1KwWqiNgT2CszjyoXXRsR\nfwJmA08btl4P0N/sdwwPVJIkSc2ceOKJLFy4cINlz3jGM4bud3d3D90/7LDDmDZtGtOnT6erq4u1\na9cyf/589t13X17xilcQEWN6zZENPYsXLx513aotVP8L7BIR22bmQ2VwWkDRZ+pDEbGk7Ed1PLCs\n4mtJkqStVCMEfe5zn+MNb3gDANtss83Q85mPnhi7+uqruf3227niiitYu3Ytu+22G0cccQQ77LAD\nV199NQMDAy2vr1Ifqsz8LfAR4JsRcRXwTeCyzPwu8E/AFRHxXWAf4LyqxUqSpK3bOeecA8Cf/vQn\ntt12W2DjCx7fe++9HHnkkey77768+tWvZtttt2X+/PlD6371q1/lgAMO4Pvf/37L6qrchyozvwZ8\nrcnyq4GDqv5+SZKkkX77298ya9YsAAYHB7n88ss54IADeP/7389LXvIS9tlnH372s5/xwAMPcPfd\ndzNnzpyhdV/1qldx7rnntrQeR95JkqSO0WiJ2n333YcucpyZvOQlL+GCCy4YWu/zn/889913H2vW\nrOHggw9m+vTpAOy4447ss88+La/LQCVJkjrCmjVrWLduHVdeeSV33HEHt99+O7fffjuvf/3rmTLl\n0UjzwAMPcOCBBzJt2jSmTZs2NDIQoL+/n7333rvltRmo1FJToenoia5p0xh8+OENls3YbTdW//rX\nE1RZ5+jtnU1f36qNls+YMYvVq++c+II0dj09G23/bdnOu5t/DmfsMoPVd62e2FpaZHZvL6v6+tpd\nhtpk1apVHHnkkeyyyy4ccMABXH311cycOZP58+ezcOFC7r333g3W33777bnllltG/V3HHXdcy2s0\nUKml1tF8ArJ4+OGN5jLZnPlHtiZFmNr4Xezr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tImpduBOcAK4BCK0363UFzLahCobefXzHwY+FBEvCYi3p+Z/0zxxdNJRn4Znkxx\n4d7anWot+9J9o+y0u4hiEMC55Smo49tZ2yT2IPBgOe/Uh6O4CPiJmfn2dhc2yd2YmWuASwEi4vHl\n4IBD2lvWpLcuIp6amb8EiIj9meCLUU+2aRO2pzgK3oGiM+Z7JvL86dYmiquTf4biQqtrgRNH9NHo\nCBGxS2be3e46xioi5lKcTgiK0SwB3JmZtW/hiYipfibbozy998TM/H27a9maRMQzMvPmdtcx2UXE\nTIo+vY1Tq2uAd2Xmbx7zB1tZw2QKVJIkSe3g+XNJkqSKDFSSJEkVGagkSZIqMlBJkiRVZKCSJEmq\naLLNQyVpK1Vel/FPmbm0fHwVxTw0/RSz33cDvZn5rPZVKWmyMlBJ6ijlfDNLKGZd/zWwMDMfoZjQ\ndOSlVJJiP9dNEa6cJ0bSuDBQSeo0HwHenpm/jIi/pbgg6jkUgWqbYeutB1427HE3Xn5K0jgxUEnq\nNDs0Li8BfA74FEWgGmTDfqFXAn9fLh8on+umCGSS1FIGKkmdpnvY/fU8ehovKa6wcjjFhZYfYuNr\nefVExAuAj2Tmt8a9UklbDQOVpE6zJiL2z8wfAa8EriuXd1FcTutKitapjUREpNfbkjQODFSSOs27\ngAsioouiU/rflMu7GHbKLyJ+ADxMcbpvkKLD+j5A74RWK2mrYKCS1FHKq8cf3uSpLjYc5XdnZh49\nfIWI+JKtVJLGg4FK0mRxP/DAsMd7RcRyin5W6yn2d/sA0yj6V0lSy4QHapImI1uiJE0kA5UkSVJF\nXstPkiSpIgOVJElSRQYqSZKkigxUkiRJFRmoJEmSKvr/UQv+cTAhWb0AAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x10ea029b0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"sorted_df[subjects].plot(kind='bar', figsize=(10, 6))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"일지매는 전체적으로 점수가 고르게 높은데, 2등부터는 약간 들쑥날쑥하네요. 과목별 점수 분포를 볼까요? boxplot으로 그려보겠습니다."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x10eb57160>"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAECCAYAAAAB2kexAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGAFJREFUeJzt3X+MZXV5x/H3h90Vk1IdUGM1ta5KLEoNa2sLW3+NEHRN\nQdoUa22rTrEWUFbXROMPSHetxvAropISlkSdDaURbKpFkKUiHCEKa1tdCm0EFcFW1EaX1YZSWODp\nH/dcdnbY2XN2z3fu+Z7v/bySgTnn3jv3M8/e+8yd55z7HUUEZmZWhoP6DmBmZum4qZuZFcRN3cys\nIG7qZmYFcVM3MyuIm7qZWUHc1M3MCrJfTV3S+yX95YLttZJukbRN0mZJBy247G2S/qX+OD1laDMz\n27tWTV3SMyXdDLx7wb6VwNnAuog4GrgdOK2+7AX1/pdExEuAWUkvTJ7ezMz20KqpR8S9EbEWeO+C\n3euAayJiZ719MXBy/flbgfMWXPdjwCkds5qZWYP9nalrweeHA3eMNyJiF7Byb5cB3wGedyABzcys\nvS4HSgUsXjgmWlxmZmbLZGXzVZZ0F3DEeEPSKuDhevN7wPOBb9Tbzwe+u/gLSHKjNzM7ABGhve3v\n8kp9K3CCpJl6+xTgivrzS4H3AEgScAbw6SWCZf8BG3vPUNLHxo2up+uZ58dQarkvB/xKPSIelHQm\nsFXSLuBWYH192bck3STpG4xevX86Ir59oPfVv7v7DlCUu+++u+8IRXE90ymhlvvV1CNiy6LtG4Fj\nlrjuhcCFBx4tH0cd1XcCM7N2/I7SFj7+8bm+IxRlbm6u7whFcT3TKaGWaprPLOudS9Hn/ZuZDZEk\nYhkOlE6Nqqr6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G+smyL67lvj3M/p2x5rPb2hPNj71B1NPLBHRU/0q8\ncolX+rYfXMu0JD0V2BERPk00gaHU003dzKwgg/h1wszM2nFTNzMriJu6mVlB3NTNzAripm5mVhA3\ndTOzgvw/TWbFl1VEXAAAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x10ebf8518>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df[subjects].boxplot(return_type='axes')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1반과 2반을 각각 boxplot으로 그려봅시다."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x10ed6f828>"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAECCAYAAAAB2kexAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF1NJREFUeJzt3X+MZXV5x/H3h91Vk1KdXaVWU+tUiUXROLa2sNXqAMGu\nKUh/YKxN1SnWAsrWNdH4A9Ld1sbyK1K1JayJOhNqI9hWqyBLRfeKUcC2OltMI6i42Ira6O5qQyks\n7NM/7pmd2XFm7tk933vP93zv55Vcds65v555uPPMuZ9z7hlFBGZmVobj2i7AzMzS8VA3MyuIh7qZ\nWUE81M3MCuKhbmZWEA91M7OCeKibmRXkqIa6pLdJ+uMly5sl3S7pDkk7JR235LrXSfrX6nJhyqLN\nzGxltYa6pCdLug1405J164FLgS0RcQrwVeCC6rpnVuufHxHPB6YlPSt59WZmdoRaQz0i7ouIzcBb\nlqzeAtwUEQeq5WuAc6uvXwtcseS27wbOa1irmZkNcLSZupZ8fSJw18JCRBwE1q90HfB14OnHUqCZ\nmdXXZEepgOUnjoka15mZ2ZCsH3yTVd0DnLSwIGkD8HC1+E3gGcCXquVnAN9Y/gCSPOjNzI5BRGil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unTBDRUvSVev8qW\nvh0F9zItSU8A9kWEDxNNoCv99FA3MytIJ95OmJlZPR7qZmYF8VA3MyuIh7qZWUE81M3MCuKhbmZW\nkP8Hry8M933dJTEAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x10ea23160>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"일반[subjects].boxplot(return_type='axes')"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x10ef7e160>"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAECCAYAAAAB2kexAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF1dJREFUeJzt3X+MZXV5x/H3h91Vk1KdRazVVN0qsSg1rq0tbrV6haJr\nCtIfa6xN1SnWAsoqJjX+gHSXaiy/KlVawtqoS6iNYFOtgiwV5ahRwLY6W0gjVHG1FbXR3dGGUljg\n6R/33N1hmJl7ds937vme7/28ktE5Z+6PZx7OPnPv5577vYoIzMysDEd0XYCZmaXjoW5mVhAPdTOz\ngniom5kVxEPdzKwgHupmZgXxUDczK8ghDXVJb5f0xwu2N0m6WdItknZIOmLBz14v6V/qrzNTFm1m\nZktrNNQlPVHSTcBbFuxbC5wPbI6I44HbgDPqnz2j3v/ciHguMJD0zOTVm5nZQzQa6hFxV0RsAt66\nYPdm4LqImK+3Lwe21N+/DrhowWXfC5zWslYzMxvjUDN1Lfj+GOD20UZE7AfWLvUz4D+Apx1OgWZm\n1lybF0oFLF44Jhr8zMzMVsna8RdZ1p3AsaMNSeuA++vNbwJPB75Sbz8d+MbiG5DkQW9mdhgiQkvt\nb/NIfRdwsqSZevs04Or6+yuBPwGQJOAs4EPLFJb9F2zrvIaSvrZtcz/dzzy/+tLLlRz2I/WIuFfS\nOcA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QmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x10ef23ef0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"이반[subjects].boxplot(return_type='axes')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"확실히, 1반의 과학점수가 좋네요. 분포 차이도 크지 않습니다. 대신 2반은 국어점수가 좋습니다."
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## 과목별 상관도 \n",
"\n",
"보통 수학 점수가 높으면 과학 점수가 높을 것이라고 기대할 수 있습니다. 국어 점수가 높으면 영어 점수가 높을 것이라고도 기대할 수 있죠. 언어능력, 수리능력이 별개의 특징처럼 생각될 수 도 있기 때문입니다. 여기 학생들도 그런지 살펴볼까요."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x10f017438>"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAESCAYAAAAFYll6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFRxJREFUeJzt3X+MZWd93/H3x/bijmolbiCxRGIcwDU2JEKWrDhLVJgY\n7awbGZtl3RYUVdOaeGMndikarDVKWrZRJLx2ljSFEtsVhpWDSAzWgiPw3l1MpvUa/wiFWFCEa0BJ\nf7igQOoihQle42//uGfWw/X+enZ+nLl33i9ptPc859x7v8/c2fu553nOOTdVhSRJLU7ruwBJ0vgx\nPCRJzQwPSVIzw0OS1MzwkCQ1MzwkSc0MD0lSszUNjyQ3J9kx0nZakk8nuWCk/dokX+h+rl/LOiVJ\nx7cm4ZHkpUkeBt450v4rwH8F/tFI+0XA5VV1SVVdAkwnefVa1CpJOrE1CY+qeqqqNgM3jbR/pqou\nBj4xcpe3A7ctWX4fcM3qVilJOllrPeeRk2w/H3hiyfKTwCtXpS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Eh\nSWpmeEiSmhkekqRmhockqZnhIS1TktOPs+60E20jjSPDQ1q+30vyO8dY984knwX+eLEhyScNE407\nTxKUliHJbwJ/H/hbhleZ/XBVVXeJi3/dtRfDD2pTwOeBG6rqqp5KllaEex7SKUjy7iR3AX9VVbdW\n1X9k+MU7dye5tftOiPcBr2B4natfYHhV6IPA6Ul+Kck5vXVAWib3PKRTkGRT930Px9vm7cCmqrq9\n+0Klj1bV5Uk+zfCCe5+vqifXol5ppY3ThRGldaG7+vFvDi8++iNOBzYBZwL/Afg0sDfJ2xgOXX24\n2+65qtq7RuVKq8I9D6lRkjMZzl880/1cyXAP409GtgtAjfwnS3JDVX1gjcqVVoV7HlKjqvoB8IPF\n5S4kjjZ/+MvAe5I8w/Ay12G4d3JRkvuq6n+sRb3SajA8pJXxotGGqvoc8LnR9iR3rklF0iryaCtp\n+Z6l7f+S/+809pzzkNZYkpcAf1NVz/Vdi3SqDA9JUjN3nyVJzQwPSVIzw0OS1MzwkCQ1MzwkSc0M\nD0lSs/8PSPCZ5YrtSRsAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x10efa3e80>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df.plot(kind='scatter', x='수학', y='과학')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"수학점수가 높으면 과학점수도 높아 보입니다. 어느정도 상관관계가 보이네요. 얼마나 상관관계가 있을까요? 이렇때 상관계수를 구해볼 수 있습니다. [피어슨 상관계수](https://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient)를 구해볼까요? scipy의 stats 모듈에 함수가 있습니다. "
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(0.56328905970677512, 0.05650580486155532)"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"stats.pearsonr(df['수학'], df['과학'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"앞 숫자가 상관계수 뒷 숫자가 p-value를 의미합니다. 상관계수가 0.5보다 높으므로, 관계가 있긴 하지만 p > 0.05 이므로, 유의한 상관관계가 있지는 않네요. 데이터가 좀 더 많아지면, p-value가 의미있어지는 경우가 많습니다. 이 경우는 데이터 n수가 작아서 의미를 찾기 어려운 것 같습니다. 국어와 영어는 어떨까요?"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x10edfba58>"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAESCAYAAAAFYll6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFddJREFUeJzt3X+wXOV93/H3ByMnmhLMTOJmasd2HCjBdjIuHaZEnoRs\nxOhKcTBYQMd2m0apHEjIoOBUpiKxp75/1RYYJxkyFEgh0RDXMTaj2o6DVjJkU8D8iG3MkGagjp10\n0hI8tVOFjq0EAd/+sedKl7WE7pHuvWfP8n7N3NE5z57d+93V7n7ueZ7nnJOqQpKkNk7qugBJUv8Y\nHpKk1gwPSVJrhockqTXDQ5LUmuEhSWrN8JAktbaq4ZHkmiSXT7SdlOSzSc6caL8syReanytWs05J\n0otblfBI8qokDwC/OtH+VuCLwE9MtL8B2FRV51TVOcAgyRtXo1ZJ0rGtSnhU1ZNVtQ64eqL9j6rq\nbOCTE3d5N3DdovWPAFtXtkpJ0lKt9phHlth+BvDEovWvAKevSEWSpNamecB88qRbnoRLkqbEyV0X\ncBRfA84EHm7WzwT+YnKjJAaKJB2HqjpaT9CSTOuex+3AewGSBLgSuO1IG1ZVb38+8IEPdF6D9Xdf\nh/X376fPtVctz9/c07Ln8YJnU1WPJLk3ycPAs8BtVfV4N6VJkiatanhU1a6jtH/HTKqqugG4YcWL\nkiS1Nq3dVi8Jg8Gg6xJO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ua2q\nHu+w3GN5QZfU8dTvEeaSpNZ60W0lSZouhockqTXDQ5LUmuEhSWrN8JAktWZ4SJJaMzykZdQcYCXN\nPI/zkI5Dc5K//ww8w/iAq+Lw6VreWVVffJH7vgN4eVXdvhq1Siuhr0eYS51qTkm/YbI9yS3AXzbL\n5wAfBp4DvlRVi0+P7V6/es03sLS8XllVf9ssXwtcWFXnA3+f5Gea9pcxPsWL1FvueUgtJfmXwHuA\nbzM+D9DLGP8h9gzwpiQPMj5p5zeq6unmbp8A5pO8B/h+YOeqFy4tI8NDaqmqPsE4DIBDYxhVVXcs\navtHvPCqeAEer6pfT3Ip46sBSr1leEjHIcmA8SWRnwP+SdP284xDYUNzxuFXJDm9ufrlzzK+/jX4\nudMM8E0sHYeqGjUXNHpuvDqetpjkNmAN4y6sK4FdSZ4BvlxVf9jc/WVd1CwtJ8NDOk7NNawnhSYc\nquox4MePsM3LOPq1paVeMDyk5VUceyaV4aHe8yBBaZU1R6GffJQ9F6kXDA9JUmseJChJas3wkCS1\nZnhIklozPCRJrRkekqTWDA9JUmv/HxlHH9ybJU+hAAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x10f15f898>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df.plot(kind='scatter', x='국어', y='영어')"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(0.10566562777973997, 0.74379595518578356)"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"stats.pearsonr(df['국어'], df['영어'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"상관관계가 아주 약간 있어보이지만 별로 없네요. 이 경우도, 데이터가 많으면 좀 더 충분한 관계를 밝혀낼 수 있을 것 같습니다. \n",
"\n",
"## 학생별 성적 패턴 분석\n",
"\n",
"학생별로 어떤 학생은 수학을 잘하면서 과학을 잘하지만 영어는 약할 수 있고, 또 어떤 학생은 다른 패턴으로 잘하는 과목에 대한 특징이 있을 수 있습니다. 학생들끼리 이러한 성적 패턴이 얼마나 비슷한지 비교해 볼 수 있을까요? 이를 확인할 수 있는 다양한 방법이 있습니다. 대표적인 방법으로 [주성분분석 (Principle component analysis)](https://ko.wikipedia.org/wiki/주성분_분석)이 있습니다. 학생별로 4과목이라는 특성을 두개로 축약한 후, 2차원 평면에 표시하면, 그 종합적인 차이를 한눈에 알 수 있습니다. \n",
"\n",
"PCA 분석은 [scikit-learn](http://scikit-learn.org/stable/)이라는 라이브러리를 설치하고 수행할 수 있습니다. \n",
"\n",
"PCA 분석의 입력자료는 4과목의 성적데이터 입니다."
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>국어</th>\n",
" <th>영어</th>\n",
" <th>수학</th>\n",
" <th>과학</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>67</td>\n",
" <td>87</td>\n",
" <td>90</td>\n",
" <td>98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>45</td>\n",
" <td>45</td>\n",
" <td>56</td>\n",
" <td>98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>95</td>\n",
" <td>59</td>\n",
" <td>96</td>\n",
" <td>88</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>65</td>\n",
" <td>94</td>\n",
" <td>89</td>\n",
" <td>98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>45</td>\n",
" <td>65</td>\n",
" <td>78</td>\n",
" <td>98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>78</td>\n",
" <td>76</td>\n",
" <td>98</td>\n",
" <td>89</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>87</td>\n",
" <td>67</td>\n",
" <td>65</td>\n",
" <td>56</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>89</td>\n",
" <td>98</td>\n",
" <td>78</td>\n",
" <td>78</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>100</td>\n",
" <td>78</td>\n",
" <td>56</td>\n",
" <td>65</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>99</td>\n",
" <td>89</td>\n",
" <td>87</td>\n",
" <td>87</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>98</td>\n",
" <td>45</td>\n",
" <td>56</td>\n",
" <td>54</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>65</td>\n",
" <td>89</td>\n",
" <td>87</td>\n",
" <td>78</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 국어 영어 수학 과학\n",
"0 67 87 90 98\n",
"1 45 45 56 98\n",
"2 95 59 96 88\n",
"3 65 94 89 98\n",
"4 45 65 78 98\n",
"5 78 76 98 89\n",
"6 87 67 65 56\n",
"7 89 98 78 78\n",
"8 100 78 56 65\n",
"9 99 89 87 87\n",
"10 98 45 56 54\n",
"11 65 89 87 78"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[subjects]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"이 데이터를 정규화합니다. 전체 데이터를 최대, 최소를 기준으로 재 정리합니다. 정규화하는 함수는 scikit-learn 라이브러리에서 제공됩니다. "
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"array([[-0.55809652, 0.72621778, 0.78954203, 1.01066629],\n",
" [-1.70024754, -1.68176748, -1.44749373, 1.01066629],\n",
" [ 0.89555023, -0.87910573, 1.18431305, 0.36897341],\n",
" [-0.66192843, 1.12754865, 0.72374686, 1.01066629],\n",
" [-1.70024754, -0.53510783, 0. , 1.01066629],\n",
" [ 0.01297899, 0.09555497, 1.31590339, 0.43314269],\n",
" [ 0.48022259, -0.42044187, -0.8553372 , -1.68444381],\n",
" [ 0.5840545 , 1.35688058, 0. , -0.27271947],\n",
" [ 1.15513001, 0.21022093, -1.44749373, -1.10692022],\n",
" [ 1.10321405, 0.84088374, 0.59215653, 0.30480412],\n",
" [ 1.0512981 , -1.68176748, -1.44749373, -1.81278239],\n",
" [-0.66192843, 0.84088374, 0.59215653, -0.27271947]])"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sklearn.preprocessing import StandardScaler\n",
"X_std = StandardScaler().fit_transform(df[subjects])\n",
"X_std"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"위 행렬데이터가 PCA의 입력으로 사용됩니다. PCA 분석 함수는 scikit-learn 라이브러리에 있습니다. "
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"array([[-1.56591653, -0.09168753],\n",
" [ 0.11774518, 2.93515218],\n",
" [-0.20727166, -0.38845514],\n",
" [-1.71984653, -0.24234692],\n",
" [-1.11185524, 1.70512415],\n",
" [-1.03327136, -0.43547978],\n",
" [ 1.88205338, -0.20323602],\n",
" [-0.10118555, -1.27408337],\n",
" [ 1.88020684, -0.64411706],\n",
" [-0.39554448, -1.36047251],\n",
" [ 2.98704605, 0.37256038],\n",
" [-0.7321601 , -0.37295837]])"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sklearn.decomposition import PCA\n",
"pca = PCA(n_components=2)\n",
"Y = pca.fit_transform(X_std)\n",
"Y"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`Y` 변수에 4과목(4차원)을 2차원으로 축약한 데이터 값이 저장됩니다. 보통 제1주성분, 제2주성분이라고도 합니다. 이를 원래 데이터(df)에 추가합니다. "
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>반</th>\n",
" <th>이름</th>\n",
" <th>국어</th>\n",
" <th>영어</th>\n",
" <th>수학</th>\n",
" <th>과학</th>\n",
" <th>총점</th>\n",
" <th>평균</th>\n",
" <th>PC1</th>\n",
" <th>PC2</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>성춘향</td>\n",
" <td>67</td>\n",
" <td>87</td>\n",
" <td>90</td>\n",
" <td>98</td>\n",
" <td>342</td>\n",
" <td>85.50</td>\n",
" <td>-1.565917</td>\n",
" <td>-0.091688</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>이몽룡</td>\n",
" <td>45</td>\n",
" <td>45</td>\n",
" <td>56</td>\n",
" <td>98</td>\n",
" <td>244</td>\n",
" <td>61.00</td>\n",
" <td>0.117745</td>\n",
" <td>2.935152</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1</td>\n",
" <td>향단이</td>\n",
" <td>95</td>\n",
" <td>59</td>\n",
" <td>96</td>\n",
" <td>88</td>\n",
" <td>338</td>\n",
" <td>84.50</td>\n",
" <td>-0.207272</td>\n",
" <td>-0.388455</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1</td>\n",
" <td>방자</td>\n",
" <td>65</td>\n",
" <td>94</td>\n",
" <td>89</td>\n",
" <td>98</td>\n",
" <td>346</td>\n",
" <td>86.50</td>\n",
" <td>-1.719847</td>\n",
" <td>-0.242347</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1</td>\n",
" <td>월매</td>\n",
" <td>45</td>\n",
" <td>65</td>\n",
" <td>78</td>\n",
" <td>98</td>\n",
" <td>286</td>\n",
" <td>71.50</td>\n",
" <td>-1.111855</td>\n",
" <td>1.705124</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>1</td>\n",
" <td>변학도</td>\n",
" <td>78</td>\n",
" <td>76</td>\n",
" <td>98</td>\n",
" <td>89</td>\n",
" <td>341</td>\n",
" <td>85.25</td>\n",
" <td>-1.033271</td>\n",
" <td>-0.435480</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>2</td>\n",
" <td>홍길동</td>\n",
" <td>87</td>\n",
" <td>67</td>\n",
" <td>65</td>\n",
" <td>56</td>\n",
" <td>275</td>\n",
" <td>68.75</td>\n",
" <td>1.882053</td>\n",
" <td>-0.203236</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>2</td>\n",
" <td>임꺽정</td>\n",
" <td>89</td>\n",
" <td>98</td>\n",
" <td>78</td>\n",
" <td>78</td>\n",
" <td>343</td>\n",
" <td>85.75</td>\n",
" <td>-0.101186</td>\n",
" <td>-1.274083</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>2</td>\n",
" <td>전우치</td>\n",
" <td>100</td>\n",
" <td>78</td>\n",
" <td>56</td>\n",
" <td>65</td>\n",
" <td>299</td>\n",
" <td>74.75</td>\n",
" <td>1.880207</td>\n",
" <td>-0.644117</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>2</td>\n",
" <td>일지매</td>\n",
" <td>99</td>\n",
" <td>89</td>\n",
" <td>87</td>\n",
" <td>87</td>\n",
" <td>362</td>\n",
" <td>90.50</td>\n",
" <td>-0.395544</td>\n",
" <td>-1.360473</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>2</td>\n",
" <td>심청</td>\n",
" <td>98</td>\n",
" <td>45</td>\n",
" <td>56</td>\n",
" <td>54</td>\n",
" <td>253</td>\n",
" <td>63.25</td>\n",
" <td>2.987046</td>\n",
" <td>0.372560</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>2</td>\n",
" <td>콩쥐</td>\n",
" <td>65</td>\n",
" <td>89</td>\n",
" <td>87</td>\n",
" <td>78</td>\n",
" <td>319</td>\n",
" <td>79.75</td>\n",
" <td>-0.732160</td>\n",
" <td>-0.372958</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 반 이름 국어 영어 수학 과학 총점 평균 PC1 PC2\n",
"0 1 성춘향 67 87 90 98 342 85.50 -1.565917 -0.091688\n",
"1 1 이몽룡 45 45 56 98 244 61.00 0.117745 2.935152\n",
"2 1 향단이 95 59 96 88 338 84.50 -0.207272 -0.388455\n",
"3 1 방자 65 94 89 98 346 86.50 -1.719847 -0.242347\n",
"4 1 월매 45 65 78 98 286 71.50 -1.111855 1.705124\n",
"5 1 변학도 78 76 98 89 341 85.25 -1.033271 -0.435480\n",
"6 2 홍길동 87 67 65 56 275 68.75 1.882053 -0.203236\n",
"7 2 임꺽정 89 98 78 78 343 85.75 -0.101186 -1.274083\n",
"8 2 전우치 100 78 56 65 299 74.75 1.880207 -0.644117\n",
"9 2 일지매 99 89 87 87 362 90.50 -0.395544 -1.360473\n",
"10 2 심청 98 45 56 54 253 63.25 2.987046 0.372560\n",
"11 2 콩쥐 65 89 87 78 319 79.75 -0.732160 -0.372958"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pca_df = pd.DataFrame(Y)\n",
"pca_df.index = df.index\n",
"pca_df.columns = ['PC1', 'PC2']\n",
"df2 = pd.concat([df, pca_df], axis=1)\n",
"df2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"위 데이터의 PC1, PC2 값으로 scatter plot을 그려봅니다. 1반과 2반의 차이를 알아보기 위해, 각각을 그룹핑하고, 다른 색으로 표시합니다. "
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAD8CAYAAACB3pQWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEiRJREFUeJzt3W+IHPd9x/HP1ygbkRG26wem2ALpdusH9yS6xRhVQlhr\nBKa2bEj9IIxbI6Ngu1CUBxLkuMbceX1n58GmkUyMH8SW4za0dEsJMY1daMilK3GWfeCwkg1e6mhP\nNVzPLY5lHLSmmie/PrjT6U67e/80uzO/2fcLDu5mRjO/0e1+7je/+e5vzDknAICfbkm6AQCArSPE\nAcBjhDgAeIwQBwCPEeIA4DFCHAA8tq3fBzQzahoBYAucc3bjskR64s65DX0999xzG942C1+DdL6c\naza/Bulc+32+3TCcAgAeI8QBwGOpDvFSqZR0E/pqkM6Xc82mQTpXKR3na2uNtfTkgGau38cEAN+Z\nmVxabmx2snv3bplZJr52796d9H8ngAGRmp740l+ZvralV7J0LgDSIfU9cQDA5hHiAOAxQhwAPBZb\niJvZN8zslJn90szOmtm/mNmOuPa/liiKNDs7q9nZWUVR1NNjPfbYY/rggw96egwA2Kg4e+LbJf3U\nOfeoc+5+Sf8h6ZkY99/GOafJydc0MlLWwYOf6eDBzzQyUtbk5Gs9ubH40Ucf6cyZM7HvFwC2KrYJ\nsJxzlyVdliQz+5qkgqRfx7X/TqamTqtSyavVenp5WaPxiCqVaUmnNTHxdPd/vEmHDx9WvV5Xq9WK\nbZ9YLYoi1et1SVKxWFQul0u4RUD6xTombmbfMrOapN9JukfSO3Huf6UoilStXlKrdahtXat1SNXq\npViHVt5++20tLCxo//79se0Ti/p9RQVkSaxT0Trn3pT0piSZ2Z9L+omkx2/crlwuL39fKpW29NHV\ner2uubnugdps7lO9XtfevXs3ve+1ECrx6+cVFeCLWq2mWq227nY9m0/cOfcLM/tep3UrQxyD7foV\nVXtQL15RTWtsLGJoBQPnxg7u888/33G7OKtT7jCzQyt+fkI9HE4pFovK5891XV8ovKtisdirwyMm\nG72iAtBZnGPi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AABJ\nRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x10f9e4da0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"def draw_groups(groups, loc):\n",
" fig, ax = plt.subplots()\n",
" ax.margins(0.1)\n",
"\n",
" for name, group in groups:\n",
" ax.plot(group['PC1'], group['PC2'], marker='o', linestyle='', ms=8, label=name)\n",
"\n",
" ax.legend(numpoints=1, loc=loc)\n",
" \n",
"draw_groups(df2.groupby('반'), loc='upper left')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"위 scatter plot에 의하면 `PC1 < 0, PC2 <0` 에 있는 7명의 학생이 어느 정도 비슷한 패턴을 갖는 것으로 보입니다. 이후, 교육 방침을 정하거나, 장래 희망 상담등을 할 때, 이 결과를 이용할 수 있을 것으로 보입니다. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"여기까지, 성적 데이터 분석을 통한 데이터 분석 사례 소개를 마칩니다. 이 예제는 성적이지만, 실제 실무적으로 유사한 데이터가 많습니다. 이들을 분석하는데 도움이 되시길 바랍니다. \n",
"\n",
"--김형용, Insilicogen. Inc., 2016-01-22"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment