Student math achievement in secondary education of two Portuguese schools

student

Format

A data frame with 395 rows and 33 variables:

school

factor. student's school ('Gabriel Pereira' or 'Mousinho da Silveira').

sex

factor. student's sex ('Female' or 'Male').

age

integer. student's age (numeric: from 15 to 22).

address

factor. student's home address type ('Urban' or 'Rural').

famsize

factor. family size (binary: 'Less or equal to 3' or 'Greater than 3').

Pstatus

factor. parent's cohabitation status ('Living together' or 'Living apart').

Medu

ordered factor. mother's education ('primary education (4th grade)', '5th to 9th grade', 'secondary education' or 'higher education').

Fedu

ordered factor. father's education ('primary education (4th grade)', '5th to 9th grade', 'secondary education' or 'higher education').

Mjob

factor. mother's job ('teacher', 'health' care related, civil 'services' (e.g. administrative or police), 'at_home' or 'other').

Fjob

factor. father's job ('teacher', 'health' care related, civil 'services' (e.g. administrative or police), 'at_home' or 'other').

reason

factor. reason to choose this school (close to 'home', school 'reputation', 'course' preference or 'other').

guardian

factor. student's guardian ('mother', 'father' or 'other').

traveltime

ordered factor. home to school travel time ('1 - <15 min.', '15 to 30 min.', 30 min. to 1 hour', or '4 - >1 hour').

studytime

ordered factor. weekly study time ('<2 hours', '2 to 5 hours', '5 to 10 hours', or '>10 hours').

failures

integer. number of past class failures (numeric: n if 1<=n<3, else 4).

schoolsup

factor. extra educational support ('yes' or 'no').

famsup

factor. family educational support ('yes' or 'no').

paid

factor. extra paid classes within the course subject (Math) ('yes' or 'no').

activities

factor. extra-curricular activities ('yes' or 'no').

nursery

factor. attended nursery school ('yes' or 'no').

higher

factor. wants to take higher education ('yes' or 'no').

internet

factor. Internet access at home ('yes' or 'no').

romantic

factor. with a romantic relationship ('yes' or 'no').

famrel

integer. quality of family relationships (from 1 - very bad to 5 - excellent).

freetime

integer. free time after school (from 1 - very low to 5 - very high).

goout

integer. going out with friends (from 1 - very low to 5 - very high).

Dalc

integer. workday alcohol consumption (1 - very low to 5 - very high).

Walc

integer. weekend alcohol consumption (from 1 - very low to 5 - very high).

health

integer. current health status (from 1 - very bad to 5 - very good).

absences

integer. number of school absences (from 0 to 93).

G1

integer. first period grade (from 0 to 20).

G2

integer. second period grade (from 0 to 20).

G3

integer. final grade (from 0 to 20, output target).

Source

Data obtained from UCI Machine Learning Repository.

Original source: Paulo Cortez, University of Minho, Guimarães, Portugal, http://www3.dsi.uminho.pt/pcortez

Please include this citations when using the data: P. Cortez and A. Silva. Using Data Mining to Predict Secondary School Student Performance. In A. Brito and J. Teixeira Eds., Proceedings of 5th FUture BUsiness TEChnology Conference (FUBUTEC 2008) pp. 5-12, Porto, Portugal, April, 2008, EUROSIS, ISBN 978-9077381-39-7. Web Link.

Details

This data approach student achievement in secondary education of two Portuguese schools. The data attributes include student grades, demographic, social and school related features) and it was collected by using school reports and questionnaires. This dataset provides regarding the performance in Mathematics. Important note: the target attribute G3 has a strong correlation with attributes G2 and G1. This occurs because G3 is the final year grade (issued at the 3rd period), while G1 and G2 correspond to the 1st and 2nd period grades. It is more difficult to predict G3 without G2 and G1, but such prediction is much more useful (see paper source for more details).

Note

While the original data source provides grades in both Mathematics and Portuguese, this dataset is bases on math scores alone.

Examples

summary(student)
#> school sex age address #> Gabriel Pereira :349 Female:208 Min. :15.0 Urban:307 #> Mousinho da Silveira: 46 Male :187 1st Qu.:16.0 Rural: 88 #> Median :17.0 #> Mean :16.7 #> 3rd Qu.:18.0 #> Max. :22.0 #> famsize Pstatus Medu #> Less than or equal to 3:114 Living together:354 None : 3 #> Greater than 3 :281 Living apart : 41 Primary (4th grade): 59 #> 5th to 9th grade :103 #> secondary education: 99 #> Higher education :131 #> #> Fedu Mjob Fjob reason #> None : 2 at_home : 59 at_home : 20 course :145 #> Primary (4th grade): 82 health : 34 health : 18 home :109 #> 5th to 9th grade :115 other :141 other :217 other : 36 #> secondary education:100 services:103 services:111 reputation:105 #> Higher education : 96 teacher : 58 teacher : 29 #> #> guardian traveltime studytime failures #> father: 90 < 15 min. :257 < 2 hours :105 Min. :0.0000 #> mother:273 15-30 min. :107 2-5 hours :198 1st Qu.:0.0000 #> other : 32 30 min. to 1 hrour: 23 5-10 hours: 65 Median :0.0000 #> > 1 hour : 8 > 10 hours: 27 Mean :0.3342 #> 3rd Qu.:0.0000 #> Max. :3.0000 #> schoolsup famsup paid activities nursery higher internet #> no :344 no :153 no :214 no :194 no : 81 no : 20 no : 66 #> yes: 51 yes:242 yes:181 yes:201 yes:314 yes:375 yes:329 #> #> #> #> #> romantic famrel freetime goout Dalc #> no :263 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 #> yes:132 1st Qu.:4.000 1st Qu.:3.000 1st Qu.:2.000 1st Qu.:1.000 #> Median :4.000 Median :3.000 Median :3.000 Median :1.000 #> Mean :3.944 Mean :3.235 Mean :3.109 Mean :1.481 #> 3rd Qu.:5.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:2.000 #> Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 #> Walc health absences G1 #> Min. :1.000 Min. :1.000 Min. : 0.000 Min. : 3.00 #> 1st Qu.:1.000 1st Qu.:3.000 1st Qu.: 0.000 1st Qu.: 8.00 #> Median :2.000 Median :4.000 Median : 4.000 Median :11.00 #> Mean :2.291 Mean :3.554 Mean : 5.709 Mean :10.91 #> 3rd Qu.:3.000 3rd Qu.:5.000 3rd Qu.: 8.000 3rd Qu.:13.00 #> Max. :5.000 Max. :5.000 Max. :75.000 Max. :19.00 #> G2 G3 #> Min. : 0.00 Min. : 0.00 #> 1st Qu.: 9.00 1st Qu.: 8.00 #> Median :11.00 Median :11.00 #> Mean :10.71 Mean :10.42 #> 3rd Qu.:13.00 3rd Qu.:14.00 #> Max. :19.00 Max. :20.00