Statistics I · Unit 7 · 7 hrs
Correlation and Linear Regression
Exam-focused notes for Correlation and Linear Regression (Statistics I, STA169): what the TU syllabus asks and how it has actually been tested, with 9 solved past questions from this unit.
What this unit covers
- Bivariate data
- Bivariate frequency distribution
- Correlation between two variables
- Karl Pearson's coefficient of correlation(r)
- Spearman's rank correlation
- Regression Analysis: Fitting of lines of regression by the least squares method
- coefficient of determination
- Problems and illustrative examples related to computer Science and IT
Karl Pearson's coefficient of correlation
Correlation and Regression Analysis
$n = 8$ Number of weeks (x) 4 5 3 9 7 10 4 5 --------------------------- Speed gain (y) 85 120 48 192 164 234 74 110 --- i. Positive Correlation: Two variables move in the same direction. When one increases, the other also increases (and vice versa). Exampl...
Full solved answer →Question
What are the assumptions of Pearson's correlation? Bradford Electric Illuminating is studying the relationship between kilowatt-hours (thousands) used and the number of rooms in private single-family residences. A random sample of 5 houses yields the following.
$$\begin{array}{c|ccccc} \text{Number of rooms} & 11 & 10 & 14 & 7 & 9 \ \hline \text{Kilowatts-hours (thousands) used} & 9 & 8 & 11 & 5 & 9 \ \end{array}$$
i. Find the correlation coefficient between the number of rooms and kilowatts-hours used. Interpret the result.
ii. Determine the regression equation of kilowatts hours used on the number of rooms. Interpret the value of the regression coefficient.
iii. Estimate the kilowatts-hours used for an 8 rooms house.
[10]
1. Linear relationship: The two variables X and Y have a linear relationship. 2. Normality: The variables follow a bivariate normal distribution. 3. Continuous, quantitative data: Both variables are measured on an interval or ratio scale. 4. Homoscedasticit...
Full solved answer →Difference between Correlation and Regression Analysis
Raw materials are used in the production of synthesis and fiber are stored in a place which has no humidity control. Measurement of relative humidity in the storage place and the moisture content of a sample of raw materials (both in percentage) on 10 days yields the following results.
$$\begin{array}{c|cccccccccc} \text{Humidity % (X)} & 48 & 55 & 30 & 44 & 36 & 31 & 62 & 48 & 42 & 50 \ \text{Moisture content % (Y)} & 11 & 13 & 10 & 12 & 9 & 7 & 16 & 11 & 9 & 14 \ \end{array}$$
i. Compute correlation coefficient between humidity and moisture content and interpret the result.
ii. Find the regression equation of moisture content on humidity.
iii. Estimate the moisture content if humidity is 45%.
iv. Interpret the value of regression coefficient.
[10]
Basis Correlation Regression --------- Meaning Measures degree and direction of linear relationship between two variables Establishes functional relationship to predict one variable from another Purpose Find strength of association Estimate/predict dependen...
Full solved answer →Regression Analysis
Write the properties of correlation coefficient. The time it takes to transmit a file always depends on the file size. Suppose you transmitted 30 files, with the average size of 126 Kbytes and the standard deviation of 35 Kbytes. The average transmitted time was 0.04 seconds with the standard deviation 0.01 seconds. The correlation coefficient between the time and size was 0.86. Based on these data, fit a linear regression model and predict the time it take to transmit a 400Kbyte file.[10]
Let $X$ = file size (Kbytes), $Y$ = transmission time (seconds). Parameter X (size) Y (time) ------------------------------- Number of files $n = 30$ Mean $\bar{X} = 126$ $\bar{Y} = 0.04$ Std. deviation $SX = 35$ $SY = 0.01$ Correlation $r = 0.86$ Predict $...
Full solved answer →Question
A study was done to study the effect of ambient temperature on the electric power consumed by a chemical plant. Following table gives the data which are collected from an experimental pilot plant.
| Temperature (°F) | 27 | 45 | 72 | 58 | 31 | 60 | 34 | 74 |
|---|---|---|---|---|---|---|---|---|
| Electric Power (BTU) | 250 | 285 | 320 | 295 | 265 | 298 | 267 | 321 |
a. Identify which one is response variable, and fit a simple regression line, assuming that the relationship between them is linear.
b. Interpret the regression coefficient with reference to your problem.
c. Obtain coefficient of determination, and interpret this.
d. Based on the fitted model in (a), predict the power consumption for an ambient temperature of $65°F$. [10+0]
x = Temp (°F) 27 45 72 58 31 60 34 74 --------------------------- y = Power (BTU) 250 285 320 295 265 298 267 321 $n = 8$ x y x² xy y² ------------------ 27 250 729 6750 62500 45 285 2025 12825 81225 72 320 5184 23040 102400 58 295 3364 17110 87025 31 265 9...
Full solved answer →Regression Analysis: Normal Stress and Shear Resistance
There is a data inconsistency in the problem statement. The header row lists 9 pairs, but the intro table string lists 10 values for each variable. I will use the 9 clearly-tabulated pairs from the bracketed array: X (Normal stress) 26 25 28 23 27 23 24 28 ...
Full solved answer →Spearman's rank correlation
Calculate Spearman's rank correlation coefficient for the following ranks given by three judges in a music contest. Indicate which pair of judges has the nearest approaches to music.
$$\begin{array}{c|cccccccccc} \text{1}^{\text{st}}\text{ Judge} & 2 & 1 & 4 & 6 & 5 & 8 & 9 & 10 & 7 & 3 \ \text{2}^{\text{nd}}\text{ Judge} & 4 & 3 & 2 & 5 & 1 & 6 & 8 & 9 & 10 & 7 \ \text{3}^{\text{rd}}\text{ Judge} & 5 & 8 & 4 & 7 & 10 & 2 & 1 & 6 & 9 & 3 \ \end{array}$$
[5]
$n = 10$ competitors. Competitor 1st Judge ($R1$) 2nd Judge ($R2$) 3rd Judge ($R3$) :---::---::---::---: 1 2 4 5 2 1 3 8 3 4 2 4 4 6 5 7 5 5 1 10 6 8 6 2 7 9 8 1 8 10 9 6 9 7 10 9 10 3 7 3 Formula: $$rs = 1 - \frac{6\sum d^2}{n(n^2 - 1)}, \quad n(n^2-1) = 1...
Full solved answer →Question
Following data represent the preference of 10 students studying B.Sc(CSIT) towards two brands of computer namely Lenovo and Acer. Apply appropriate statistical tool to measure whether the brand preference is correlated. Also interpret your result.
$$\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|}\hline \text{Computer} & \text{Student Preference} & & & & & & & & & \ \hline \text{Lenovo} & 5 & 2 & 9 & 8 & 1 & 10 & 3 & 4 & 6 & 7 \ \text{Acer} & 10 & 5 & 1 & 3 & 8 & 6 & 2 & 7 & 9 & 4 \ \hline \end{array}$$
[5]
Note: The question mentions DELL and HP in the text but the table gives Lenovo and Acer. I use the table data (the actual numbers). Ranks by 10 students, $n = 10$: Student Lenovo ($R1$) Acer ($R2$) --------- 1 5 10 2 2 5 3 9 1 4 8 3 5 1 8 6 10 6 7 3 2 8 4 7...
Full solved answer →Spearman's Rank Correlation Coefficient
As part of study of the psychological correlates of success in athletes, the following measurements are obtained from members of Nepal national football team. Calculate Spearman's rank correlation coefficient.
$$ \begin{array}{c|cccccccc} \text{Anger} & 6 & 7 & 5 & 21 & 13 & 5 & 13 & 14 \ \text{Vigor} & 30 & 23 & 29 & 22 & 19 & 19 & 28 & 19 \end{array} $$
[5]
Player Anger Vigor ---------------------- 1 6 30 2 7 23 3 5 29 4 21 22 5 13 19 6 5 19 7 13 28 8 14 19 $n = 8$ Anger: values sorted: 5, 5, 6, 7, 13, 13, 14, 21 - Two 5's occupy positions 1, 2 → rank $\frac{1+2}{2} = 1.5$ - 6 → rank 3 - 7 → rank 4 - Two 13's ...
Full solved answer →Make Unit 7 stick
Practice STA169 with flashcards & quizzes