Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In this section, you will construct several confidence intervals. You will need

ID: 3310053 • Letter: I

Question

In this section, you will construct several confidence intervals. You will need to create a random sample of the data. The simplest way to create the random sample is to add an additional column in the spreadsheet and using the rand() function generate a set of random numbers. Then sort the entire spreadsheet but those values. The first 95 observations should be used for your sample.

At the end of each confidence interval compare your result to the true mean (the population i.e. the entire excel file)

Here are the confidence intervals you will need to contruct:

A 90% confidence interval for the age of the students.

A 99% confidence interval for the final grade (G3)

A 95% confidence interval for the number of absences students have.

A 95% confidence interval of your choice.

ID school sex age address famsize Pstatus Medu Fedu Mjob Fjob reason guardian traveltime studytime failures schoolsup famsup paid activities nursery higher internet romantic famrel freetime goout Dalc Walc health absences G1 G2 G3 subject 0.002621 332 GP F 16 U GT3 A 3 1 services other course mother 1 2 3 no yes yes no yes yes yes no 2 3 3 2 2 4 5 7 7 7 math 0.003063 835 MS F 16 U LE3 A 2 2 at_home other reputation mother 2 4 0 no no no yes no no no yes 1 2 1 1 1 1 4 10 9 11 port 0.003201 964 GP M 18 U GT3 T 4 4 other other course mother 1 3 0 no no no yes yes yes yes no 4 3 3 2 2 3 3 9 12 11 math 0.003875 141 MS M 17 U GT3 T 3 3 health other course mother 2 2 0 no yes yes no yes yes yes no 4 5 4 2 3 3 2 13 13 13 math 0.005714 103 GP M 18 U GT3 T 2 2 services other home mother 1 2 0 no yes no yes yes yes yes no 4 4 4 2 4 5 10 12 11 11 port 0.005872 577 GP F 15 R GT3 T 2 4 services health course mother 1 3 0 yes yes yes yes yes yes yes no 4 3 2 1 1 5 2 10 9 8 math 0.006689 1006 GP F 17 R GT3 T 4 2 other other course mother 1 3 0 no yes no yes yes yes yes no 4 3 4 1 3 5 2 11 12 14 port 0.007931 840 MS M 16 R GT3 T 1 1 at_home other other father 2 1 0 no no no yes yes yes no no 3 4 4 3 4 5 6 11 11 11 port 0.008136 825 MS M 17 U GT3 T 3 4 services other other mother 1 2 1 no yes no yes no yes yes yes 5 4 4 3 4 5 8 8 9 8 port 0.008136 23 GP F 17 R GT3 T 2 1 at_home services course mother 3 2 0 no no no yes yes yes no no 2 1 1 1 1 3 2 13 11 11 math 0.008695 559 GP M 16 U GT3 T 2 2 services other reputation father 2 2 0 no no no yes no yes yes no 4 4 2 1 1 3 6 12 10 11 port 0.012335 809 GP M 15 U LE3 A 4 4 teacher teacher course mother 1 1 0 no no no yes yes yes yes no 5 5 3 1 1 4 4 13 14 14 port 0.013905 586 GP F 15 U GT3 T 4 4 services teacher other father 1 2 1 yes yes no yes no yes yes no 4 4 4 1 1 3 2 7 7 7 math 0.013927 487 GP F 17 R GT3 A 3 2 other other home mother 1 2 0 no yes yes no yes yes yes no 4 3 3 2 3 2 4 9 10 10 math 0.015657 634 GP M 17 R LE3 T 2 1 at_home other course mother 2 1 1 no no yes yes yes no yes yes 3 3 2 2 2 5 8 8 8 9 port 0.016223 211 GP F 16 U GT3 T 3 1 services other course mother 1 4 0 yes yes yes no yes yes yes no 4 3 3 1 2 5 4 7 7 6 math 0.01636 10 GP M 15 U LE3 T 2 2 services services home mother 2 2 0 no no yes yes yes yes yes no 5 3 3 1 3 4 4 15 15 15 math 0.017332 64 MS F 16 U GT3 T 1 1 at_home other course father 1 2 0 no yes no no no yes no yes 5 4 3 2 1 2 0 13 14 15 port 0.017651 671 MS F 17 U GT3 T 4 2 teacher services home mother 1 2 0 yes yes no yes yes yes yes no 5 5 5 1 3 5 0 8 8 0 port 0.017973 86 GP M 17 U LE3 T 1 1 health other course mother 2 1 1 no yes no yes yes yes yes no 4 4 4 1 2 5 0 9 10 10 port 0.018477 540 GP F 15 R LE3 T 3 1 other other reputation father 2 4 0 no yes no no no yes yes no 4 4 2 2 3 3 6 15 15 15 port 0.019656 775 GP M 15 U GT3 T 4 3 teacher services course father 2 4 0 yes yes no no yes yes yes no 2 2 2 1 1 3 6 9 11 11 port 0.020046 916 MS F 16 R GT3 T 1 1 at_home other course father 2 2 3 yes yes no no yes yes no no 3 4 3 1 1 1 0 7 7 8 port 0.0204 995 GP F 16 U GT3 T 4 4 teacher services home mother 1 3 0 no yes no yes no yes yes no 5 3 2 1 1 5 4 15 16 16 port 0.021899 608 GP M 15 U GT3 T 4 4 health health other father 1 1 0 no yes yes no yes yes yes no 5 4 2 1 1 5 0 11 12 12 port 0.023435 9 GP F 17 U GT3 T 3 2 other other course mother 1 2 0 no no no yes no yes yes no 5 3 4 1 3 3 10 16 15 15 math 0.026202 379 MS F 16 R GT3 T 2 2 other other course mother 3 2 0 no yes no no yes yes yes no 4 4 5 1 1 4 4 9 10 11 port 0.027159 146 GP M 18 U LE3 T 3 3 services health home father 1 2 0 no yes no no yes yes yes no 3 2 4 2 4 4 10 10 10 10 port 0.027637 719 GP F 17 U GT3 T 4 3 health services reputation mother 1 3 0 no yes yes no yes yes yes no 4 2 2 1 2 3 0 15 15 15 math 0.027803 612 GP F 18 U GT3 A 3 2 other services course other 1 3 0 no yes no yes no yes yes yes 4 3 3 5 1 5 10 12 11 11 port 0.02856 883 GP M 16 U GT3 T 4 4 services services course mother 1 1 0 no no yes yes yes yes yes no 5 3 2 1 2 5 4 14 15 15 port 0.029004 730 GP F 18 U GT3 T 2 2 at_home other course mother 4 2 0 no no no yes yes yes no yes 4 2 5 1 1 2 2 10 9 10 port 0.029409 421 GP F 15 U GT3 T 4 4 teacher teacher course mother 2 1 0 no no no yes yes yes yes no 4 3 2 1 1 5 0 16 16 15 math 0.029497 359 GP M 19 R GT3 T 3 3 other services reputation father 1 2 1 no no no yes yes yes no yes 4 5 3 1 2 5 0 15 12 12 math 0.029676 667 GP F 15 U LE3 A 2 1 at_home other home mother 2 1 0 no yes no yes yes no yes yes 4 4 2 1 1 5 0 11 10 10 port 0.031594 668 MS F 16 R LE3 T 2 2 other services course father 1 2 0 no no no yes yes yes no yes 5 4 3 1 1 1 0 11 13 12 port 0.032496 557 GP F 19 U LE3 T 3 2 services other reputation other 2 2 1 no yes yes no no yes yes yes 4 2 2 1 2 1 22 13 10 11 math 0.033051 232 MS F 19 R GT3 A 1 1 at_home at_home course other 2 2 3 no yes no yes yes no no yes 3 5 4 1 4 1 0 8 0 0 port 0.034918 623 MS F 17 U LE3 A 3 2 services other reputation mother 2 2 0 no no no no yes yes no yes 1 2 3 1 2 5 0 15 14 15 port 0.036276 409 GP M 17 U GT3 T 1 2 at_home services other other 2 2 0 no no no yes no yes yes no 4 4 4 4 5 5 16 10 11 12 port 0.037045 109 GP F 18 R GT3 T 4 4 teacher other reputation mother 2 2 0 no no no yes yes yes yes no 4 3 4 2 2 4 8 10 11 12 port 0.037706 546 MS M 18 R GT3 T 4 2 other other home father 2 1 1 no no yes no yes yes no no 5 4 3 4 3 3 14 6 5 5 math 0.038943 950 GP F 16 U GT3 T 3 2 other other reputation mother 1 2 0 no yes yes no yes yes yes no 1 2 2 1 2 1 14 12 13 12 math 0.040237 958 GP F 17 U GT3 T 2 4 at_home health reputation mother 2 2 0 no yes yes no yes yes yes yes 4 3 3 1 1 1 2 10 10 10 math 0.04101 342 GP F 17 U GT3 T 3 4 at_home services home mother 1 3 1 no yes yes no yes yes yes yes 4 4 3 3 4 5 14 8 9 8 port 0.041232 827 GP M 17 R GT3 T 2 2 other other course father 2 2 0 no yes yes yes yes yes yes no 4 5 2 1 1 1 4 11 11 11 math 0.044428 766 GP F 16 U LE3 T 4 3 teacher services course mother 3 2 0 no yes no yes yes yes yes no 5 4 3 1 2 1 2 16 15 15 math 0.046285 54 GP F 18 R GT3 T 3 1 other other reputation mother 1 2 1 no no no yes yes yes yes yes 5 3 3 1 1 4 16 9 8 7 math 0.04647 202 GP M 17 R GT3 T 1 1 other other home father 2 3 0 no no no no no yes yes yes 4 3 3 1 1 1 2 13 14 15 port 0.04759 479 GP F 17 U LE3 T 2 4 services services course father 1 2 0 no no no yes yes yes yes yes 4 3 2 1 1 5 8 14 15 16 port 0.048279 5 GP M 18 U LE3 T 2 2 other other course mother 1 4 0 no yes no yes yes yes yes no 4 5 5 2 4 5 2 9 8 8 math 0.04871 926 GP F 15 U GT3 T 1 2 at_home other course mother 1 2 0 no yes yes no no yes yes no 4 3 2 1 1 5 2 10 11 11 math 0.050293 102 GP F 17 U LE3 T 4 2 teacher services reputation mother 1 4 0 no yes yes yes yes yes yes no 4 2 3 1 1 4 6 14 12 13 math 0.050377 245 GP F 17 U GT3 T 2 3 at_home other home father 2 1 0 no yes yes no yes yes no no 3 3 3 1 4 3 3 7 7 8 math 0.051157 882 GP M 15 R GT3 T 2 1 health services reputation mother 1 2 0 no no no yes yes yes yes yes 5 4 2 1 1 5 4 10 9 10 port 0.051832 455 GP F 16 U GT3 T 2 2 at_home other home mother 1 2 1 yes no no yes yes yes yes no 3 1 2 1 1 5 12 8 10 10 port 0.052856 1041 MS M 18 R GT3 T 1 3 at_home other course mother 2 2 0 no yes yes no yes yes no no 3 3 4 2 4 3 0 8 10 9 port 0.053369 814 GP M 15 U GT3 A 4 4 other services reputation mother 1 4 0 no yes no yes no yes yes yes 1 3 3 5 5 3 0 11 12 12 port 0.055456 11 GP M 18 U GT3 T 2 1 services services other mother 1 1 2 no no no no no no yes no 3 2 5 2 5 5 4 7 8 6 port 0.056198 173 GP M 19 U GT3 T 3 2 services at_home home mother 1 1 3 no yes no no yes no yes yes 4 5 4 1 1 4 0 5 0 0 math 0.057808 802 GP F 17 R GT3 T 4 3 teacher other reputation mother 2 3 0 no yes yes yes yes yes yes yes 4 4 2 1 1 4 6 7 7 7 math 0.059107 335 GP F 15 U LE3 T 4 3 services services reputation father 1 2 0 yes no no yes yes yes yes yes 4 4 4 2 4 2 0 10 10 10 math 0.060063 812 GP F 16 R GT3 T 2 2 services services reputation mother 2 4 0 no yes no yes no yes yes no 5 3 5 1 1 5 6 13 13 13 port 0.061334 1029 MS F 17 U GT3 T 2 2 other at_home course mother 1 1 0 no yes no yes yes no no no 4 5 3 1 1 5 4 9 9 10 port 0.062322 381 GP F 18 U LE3 A 4 4 health other home mother 1 2 0 no yes yes no yes yes yes yes 4 2 4 1 1 4 0 14 15 15 port 0.064873 461 GP F 18 U LE3 A 2 2 services other reputation mother 2 2 0 no yes no no yes yes yes no 4 1 4 1 3 4 10 14 17 17 port 0.065994 355 MS F 18 U LE3 T 1 1 at_home services course father 2 3 0 no no no no yes yes yes no 5 3 2 1 1 4 0 19 17 18 port 0.06881 274 GP M 18 U GT3 T 4 4 teacher services home mother 2 1 0 no no no yes yes yes yes no 3 2 4 1 4 3 6 11 12 12 port 0.068903 854 MS F 15 R GT3 T 1 1 at_home at_home course father 3 2 0 no yes no no yes yes no no 4 2 1 1 2 2 0 13 14 14 port 0.071367 998 GP M 17 R GT3 T 2 2 other other course father 2 2 0 no yes no yes yes yes yes no 4 5 2 1 1 1 0 12 13 13 port 0.071587 1031 MS F 17 U GT3 T 0 1 other at_home course father 2 1 0 no no no yes no yes no no 2 4 4 3 5 5 5 9 9 10 port 0.071664 649 GP F 17 U GT3 T 1 1 services teacher reputation mother 1 3 0 no yes yes no yes yes yes no 4 3 3 1 1 3 6 13 12 12 math 0.071687 482 GP M 17 U LE3 T 4 3 teacher other course mother 2 2 0 no no no yes yes yes yes no 4 4 4 4 4 4 0 10 11 11 port 0.071818 169 MS F 19 R GT3 T 2 3 services other course mother 1 3 1 no no no yes no yes yes no 5 4 2 1 2 5 0 7 5 0 math 0.072629 963 GP F 17 U GT3 T 2 2 other other course mother 1 2 0 no yes no no yes yes no yes 4 2 2 1 1 3 12 11 9 9 math 0.073153 427 MS M 19 U GT3 T 1 1 other other other mother 1 2 2 no yes no yes yes no yes no 4 4 3 3 4 4 2 9 9 10 port 0.073615 423 GP F 16 U LE3 A 3 3 other services home mother 1 2 0 no yes no no yes yes yes no 2 3 5 1 4 3 12 11 12 11 math 0.075127 213 MS F 15 R GT3 T 3 3 other services course father 2 1 0 no no no no no yes yes no 4 1 3 1 1 4 0 14 16 16 port 0.077956 875 MS F 17 R LE3 A 3 1 other at_home course other 2 3 0 no yes yes no yes no no no 4 2 3 2 2 3 5 8 7 8 port 0.078459 238 GP F 16 R GT3 T 2 2 services services reputation mother 2 4 0 no yes yes yes no yes yes no 5 3 5 1 1 5 6 10 10 11 math 0.07943 977 GP F 16 U GT3 T 4 2 services other course mother 1 2 0 no yes yes no yes yes yes no 4 2 3 1 1 5 2 16 15 16 port 0.080227 592 GP M 15 R GT3 T 3 2 other other course mother 2 2 2 yes yes no no yes yes yes yes 4 4 4 1 4 3 6 5 9 7 math 0.080481 956 GP F 17 U LE3 T 2 2 services services course father 1 4 0 no no yes yes yes yes yes yes 3 4 1 1 1 2 0 10 9 0 math 0.082574 46 GP M 15 R GT3 T 3 4 at_home teacher course mother 4 2 0 no yes no no yes yes no yes 5 3 3 1 1 5 0 9 0 0 math 0.08291 637 GP F 17 U GT3 T 3 4 services other course mother 1 3 0 no no no no yes yes yes no 4 4 5 1 3 5 8 11 13 14 port 0.085266 15 GP M 18 U LE3 T 3 4 services other home mother 1 2 0 no no no yes yes yes yes yes 4 3 3 1 3 5 11 16 15 15 math 0.085522 1030 MS F 17 R GT3 T 2 2 at_home other course mother 2 2 0 no yes no no yes yes yes no 4 3 5 1 2 4 0 11 10 11 port 0.08555 217 GP M 17 U LE3 A 3 2 teacher services home mother 1 1 1 no no no no yes yes yes no 4 4 4 3 4 3 19 11 9 10 math 0.086969 476 MS F 18 U GT3 T 3 3 services services other mother 2 2 0 no yes no no yes yes yes yes 4 3 2 1 3 3 6 13 12 13 port 0.088318 833 GP M 16 U LE3 T 1 2 health services course mother 2 1 2 no no no no no yes yes no 4 4 5 3 5 5 0 9 8 10 port 0.088517 220 GP M 17 U GT3 T 1 1 other other reputation father 1 2 0 no no yes no no yes yes no 4 3 3 1 2 4 2 12 10 11 math 0.089178 777 MS F 16 R LE3 T 3 4 at_home other other mother 3 2 0 no yes no no no yes no no 4 2 1 1 1 2 2 7 9 8 port 0.089549 656 MS F 15 R LE3 T 1 1 other services course mother 2 1 1 no yes no no yes yes yes yes 4 4 3 1 2 2 4 6 7 8 port 0.093268 63 GP F 16 U GT3 T 1 3 at_home services home mother 1 2 3 no no no yes no yes yes yes 4 3 5 1 1 3 0 8 7 0 math 0.09369 1039 MS M 19 U GT3 T 2 1 at_home other course other 2 1 3 no no no yes no no yes yes 4 4 3 1 3 5 4 8 9 9 port

Explanation / Answer

Here I am solving it in R-code.

I am providing the function i use to get confidence interval

confidence<-function(vec, alpha){
x<-mean(vec)
sd<-var(vec)^0.5
n=length(vec)
t<-qt(alpha/2,n)
confidence.interval<-c(x-t*sd/(n^0.5),x+t*sd/(n^0.5))
return(confidence.interval)
}

Confidence interval of AGE: confidence(age): 90%
[ 16.52522, 16.92741]

Confidence interval of G3: confidence(): 99%

[9.386768, 11.591956]

Confidence interval of Abscence: confidence(): 95%

[0.2181952 0.5477623]

Confidence interval of AGE: Failures: 95%

[0.2181952, 0.5477623]

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote