Question

In: Computer Science

Write a computer program that stores and tracks information about high school students. The first piece...

Write a computer program that stores and tracks information about high school students. The first piece of information is what grade the student is in. Since this is for high school, the available values are 9, 10, 11, and 12. We also want to track the student’s GPA. Examples of GPAs are 2.2, 2.6, and 4.0. Finally, we want to track the letter grade that the student got on his or her final exam. These values are A, B, C, D, and F. Using the programming language(s) that you select, write a program that creates variables to store these values. Devise with good names for these variables. In addition to creating the variables, set the values as follows: Grade 9 GPA 3.5 Final grade B When finished, your program should run without errors. It won’t do anything, because we have not included anything to be printed on the screen. So, when you run the program it should just terminate without errors. I am running on windows and already have Java installed

Solutions

Expert Solution

Learning Objectives 1. Define linear regression 2. Identify errors of prediction in a scatter plot with a regression line In simple linear regression, we predict scores on one variable from the scores on a second variable. The variable we are predicting is called the criterion variable and is referred to as Y. The variable we are basing our predictions on is called the predictor variable and is referred to as X. When there is only one predictor variable, the prediction method is called simple regression. In simple linear regression, the topic of this section, the predictions of Y when plotted as a function of X form a straight line. The example data in Table 1 are plotted in Figure 1. You can see that there is a positive relationship between X and Y. If you were going to predict Y from X, the higher the value of X, the higher your prediction of Y.

monika = {
"name": "monika",
"homework": [89.0, 97.0, 95.0, 92.0],
"quizzes": [88.0, 40.0, 94.0],
"tests": [95.0, 89.0]
}
shailini = {...

}

Linear regression consists of finding the best-fitting straight line through the points. The best-fitting line is called a regression line. The black diagonal line in Figure 2 is the regression line and consists of the predicted score on Y for each possible value of X. The vertical lines from the points to the regression line represent the errors of prediction. As you can see, the red point is very near the regression line; its error of prediction is small. By contrast, the yellow point is much higher than the regression line and therefore its error of prediction is large.

Figure 2. A scatter plot of the example data. The black line consists of the predictions, the points are the actual data, and the vertical lines between the points and the black line represent errors of prediction. The error of prediction for a point is the value of the point minus the predicted value (the value on the line). Table 2 shows the predicted values (Y') and the errors of prediction (Y-Y'). For example, the first point has a Y of 1.00 and a predicted Y of 1.21.

used to find the line in Figure 2. The last column in Table 2 shows the squared errors of prediction. The sum of the squared errors of prediction shown in Table 2 is lower than it would be for any other regression line. The formula for a regression line is Y' = bX + A where Y' is the predicted score, b is the slope of the line, and A is the Y intercept. The equation for the line in Figure 2 is Y' = 0.425X + 0.785 For X = 1, Y' = (0.425)(1) + 0.785 = 1.21. For X = 2, Y' = (0.425)(2) + 0.785 = 1.64.

Computing the Regression Line In the age of computers, the regression line is typically computed with statistical software. However, the calculations are relatively easy are given here for anyone who is interested. The calculations are based on the statistics shown in Table 3. MX is the mean of X, MY is the mean of Y, sX is the standard deviation of X, sY is the standard deviation of Y, and r is the correlation between X and Y.


Related Solutions

Suppose that a principal of a local high school tracks the number of minutes his students...
Suppose that a principal of a local high school tracks the number of minutes his students spend texting on a given school day. He finds that the distribution of minutes spent texting is roughly normal with a mean of 60 and a standard deviation of 20. Use this information to answer the following questions. 1. Based on the statistics, what is the probability of selecting at random a student who spends an extreme amount of time texting – either less...
Suppose that a principal of a local high school tracks the number of minutes his students...
Suppose that a principal of a local high school tracks the number of minutes his students spend texting on a given school day. He finds that the distribution of minutes spent texting is roughly normal with a mean of 60 and a standard deviation of 20. Use this information to answer the following questions. 1. Based on the statistics, find the two numbers of minutes that define the middle 95% of students in the distribution. What is the value for...
A school district developed an after-school math tutoring program for high school students. To assess the...
A school district developed an after-school math tutoring program for high school students. To assess the effectiveness of the program, struggling students were randomly selected into treatment and control groups. A pre-test was given to both groups before the start of the program. A post-test assessing the same skills was given after the end of the program. The study team determined the effectiveness of the program by comparing the average change in pre- and post-test scores between the two groups....
A researcher is investigating the effects of a new studying program for high school students hoping...
A researcher is investigating the effects of a new studying program for high school students hoping to increase test scores on the ACT exam. The ACT has a population average of 21.1 and standard deviation of 3.2 for the composite score. The researcher had 15 participants in the study who had an average ACT composite score of 23.3. Use a .035 level of significance. Name the null and alternative hypotheses (1 point) What is the critical value to test this...
1. A hypothetical computer stores 12 bits of information. The first bit is used for the...
1. A hypothetical computer stores 12 bits of information. The first bit is used for the sign of the number; the second bit is used for the sign of the exponent. Four bits are used for the magnitude of the exponent and six bits are used for the magnitude of the mantissa. a. Represent the number -147.32 in Binary scientific notation b. How would the number be represented in the computer? c. Calculate the true error and absolute relative true...
In a certain high school, uniforms are optional. A study shows that high school students who...
In a certain high school, uniforms are optional. A study shows that high school students who wear uniforms have a lower grade average than students who don't wear uniforms. From this study, the school administration claims that they should not require the students to wear uniforms because that is the cause of the lowering grades. Another possible explanation is that students who wear uniforms are poorer than the students who don't wear uniforms and the economic situation of their parents...
Twenty five high school students complete a preparation program for taking the SAT test. Here are...
Twenty five high school students complete a preparation program for taking the SAT test. Here are the SAT scores from the 25 students who completed the SAT prep program: 434 694 457 534 720 400 484 478 610 641 425 636 454 514 563 370 499 640 501 625 612 471 598 509 531 The mean of these scores is 536.00. We know that the population average for SAT scores is 500 with a standard deviation of 100. The question...
An Illinois state program evaluator is tasked with studying the intelligence of soon-to-graduate high school students...
An Illinois state program evaluator is tasked with studying the intelligence of soon-to-graduate high school students in a number of Chicago-area high schools. One of the specific questions that needs to be answered is, “How do the students of Collins High School, one of Chicago’s lowest-rated high schools in terms of academic achievement, fare in intelligence compared to students of Lincoln Park High School, one of Chicago’s highest-rated high schools in terms of academic achievement?”. To conduct this study, the...
A guidance counselor claims that high school students in a college preparation program have higher ACT...
A guidance counselor claims that high school students in a college preparation program have higher ACT scores than those in a general program. The sample mean ACT score for 49 high school students who are in a college preparation program is 22.2 and the sample standard deviation is 4.8. The sample mean ACT score for 44 high school students who are in a general program is 20.0 and the sample standard deviation is 5.4.   Use an 8% level of significance...
1. A high-school administrator who is concerned about the amount of sleep the students in his...
1. A high-school administrator who is concerned about the amount of sleep the students in his district are getting selects a random sample of 14 seniors in his district and asks them how many hours of sleep they get on a typical school night. He then uses school records to determine the most recent grade-point average (GPA) for each student. His data and a computer regression output are given below. (remember to do ALL parts). Sleep (hrs) 9 8.5 9...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT