STAT-2000---Assignment-2---Shell
pdf
keyboard_arrow_up
School
University of Manitoba *
*We aren’t endorsed by this school
Course
2000
Subject
Statistics
Date
Feb 20, 2024
Type
Pages
6
Uploaded by huongnguyenthu307
STAT 2000 - Assignment 2
Thu Huong (Rosie) Nguyen
2023-04-12
Instructions
To properly view the assignment questions, knit this file to .PDF and view the output.
To enter your answers, add code as needed into the R code chunks given below, and, where applicable,
replace the “Delete me; . . . ” and add in your own text response. Be sure when adding in text responses
to never copy-paste symbols from outside of the document. Only use the symbols on your keyboard.
Do
not
delete the question text, or modify any other part of the code except for the “author” in Line 3. All
numerical and graphical answers must be done using R, unless stated otherwise.
You will have a link in your email that takes you to the Crowdmark submission page.
Once you have
completed the worksheet, knit it to .PDF and upload your output to Crowdmark. Also, upload your .Rmd
file to Crowdmark where prompted. To see where your .Rmd file is saved, click File > Save As in the top-left
of your screen. Make sure you set your Name and Student Number in the Author section of this document
(Line 3). Do not alter the title or the date. Please note that if you do not submit a knit .PDF file, you will
be given a grade of zero.
After you knit your assignment to PDF, check your code chunks. If your code at any point runs off the page,
find the nearest comma, click to the right of it, and press Enter (or Return if you are on a Mac). This will
force a break in the code so that it goes onto the next line. All of your code must be readable in the final
submission.
All calculations and output must be visible in the final document, and all text responses should be in complete
English sentences. Your work should be done using the same formatting, functions, and packages as in your
labs and course notes, unless otherwise specified. You may speak to your class mates about ideas and what
functions/optional arguments you may need to use but you may not directly show your code/output to your
classmates.
Your full submission is due by 11:59 p.m. on Friday, March 3. Crowdmark may allow you to submit late, but
you will be given an automatic grade of zero if you do. If you have an issue that you can’t resolve without
someone looking at your work (e.g., you get an error when knitting your document), please see the Help
Centre in 311 Machray Hall.
Setup [1 mark]
0. Import the
Temps
dataset, available on the UMLearn page.
Make sure you have “Heading” set to
“Yes” when you import the data, and make sure you name the object
Temps
. [1 mark]
Temps
<-
read.csv(
"~/Downloads/Temps.csv"
)
This dataset contains the CPU temperature information for a sample of 53 PC’s, each approximately three
years old. Two readings are made: first, an initial temperature reading is made (after playing a 30 minute
benchmark video).
Then, the PC is partially disassembled, and a fresh amount of dose of thermal paste
1
is applied to the CPU. After this, another temperature reading is made (again after playing a 30 minute
benchmark video). These are the
Baseline
and
Paste
variables, respectively. All measurements are made
in degrees Celsius.
Also, the cooling system is recorded (either “Air” or “Liquid”). This is the
System
variable.
The line of code below will shuffle your data, and make the code unique to you. After importing the data,
replace 1111111 with your seven-digit student id number in the set.seed function below, and click the green
arrow at the top-right hand side of the code chunk. This part is not worth marks, but you will receive a 0
on your assignment if it is not completed correctly.
set.seed(
7959133
)
if
(exists(
"Temps"
))
{
Temps$Baseline
=
round(Temps$Baseline + rnorm(NROW(Temps),
0
,
0.1
),
1
)
Temps$Paste
=
round(Temps$Paste + rnorm(NROW(Temps),
0
,
0.1
),
1
)
}
Make sure you import your data and shuffle it (click the green arrow in the top-right) before
beginning the assignment questions.
Questions [24 marks]
The first goal is to investigate whether the re-application of thermal paste reduces the temperature of the
CPU.
1. Make a side-by-side boxplot comparing the Baseline measurements to the Paste measurements. Use
the
names
argument to properly name each boxplot, and use the
main
and
ylab
arguments to set
meaningful titles for the plot and the y-axis. [2 mark]
boxplot(Temps$Baseline, Temps$Paste,
names =
c(
"Baseline"
,
"Paste"
),
main =
"Comparation between Baseline and Paste"
,
ylab =
"Temperature (Celcius)"
,
col =
"pink"
)
2
Baseline
Paste
50
55
60
Comparation between Baseline and Paste
Temperature (Celcius)
2. Comment on what you see in the previous boxplot. Does it appear that the the reapplication of thermal
paste results in a decrease in CPU temperature? Why? [2 marks]
Based on the box plot above, we can see the median of the distribution of the Baseline is a bit higher than
the median of the Paste. However, we can see that the sample mean of this data set is positive, indicating
that it appear that the the reapplication of thermal paste results in a decrease in CPU temperature.
3. We wish to conduct a hypothesis test to see if the mean temperature is decreasing, at the 1% level of
significance. Use TeX formatting to produce the hypotheses for this test. Assume that the differences
are measured as
d
=
Baseline
−
Paste. [1 mark]
H
0
:
µ
d
= 0
vs
H
a
:
µ
d
<
0
4. Use
t.test
to conduct the appropriate hypothesis test for this problem. [3 marks]
t.test(Temps$Baseline, Temps$Paste,
paired =
TRUE,
alternative =
"less"
,
conf.level =
0.99
)
##
##
Paired t-test
##
## data:
Temps$Baseline and Temps$Paste
## t = 3.6635, df = 52, p-value = 0.9997
## alternative hypothesis: true mean difference is less than 0
3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
## 99 percent confidence interval:
##
-Inf 0.8869225
## sample estimates:
## mean difference
##
0.5358491
5. Give a fully worded conclusion to this test. [2 marks]
Since the p-value is above the alpha, at the 1% level of significance, we fail to reject H0. We have insufficient
evidence to conclude that the mean temperatures is decreasing.
6. Use
t.test
to produce a 99% confidence interval representing the mean decrease in CPU temperatures.
[1 mark]
t.test(Temps$Baseline, Temps$Paste,
paired =
TRUE,
alternative =
"two.sided"
,
conf.level =
0.99
)
##
##
Paired t-test
##
## data:
Temps$Baseline and Temps$Paste
## t = 3.6635, df = 52, p-value = 0.0005837
## alternative hypothesis: true mean difference is not equal to 0
## 99 percent confidence interval:
##
0.1447703 0.9269278
## sample estimates:
## mean difference
##
0.5358491
7. Could the confidence interval in Q6 have been used to conduct the hypothesis test in Q3-5? If so, what
would the conclusion be, and why? If not, why not? [2 marks]
Since the test is not two-sided test, and the confident level is not add up to 100%, the confidence interval in
Q6 couldn’t be used to conduct the hypothesis test in Q3-5.
We also wish to determine if Air cooling and Liquid cooling are significantly different, at the 1% level of
significance. We will use the
Baseline
measurements for the following questions.
8. Make a side-by-side boxplot comparing the temperature readings for Air cooling systems to Liquid
cooling systems. Use the
main
and
ylab
arguments to set meaningful titles for the plot and the y-axis.
[1 mark]
boxplot(Baseline ~ System, Paste ~ System,
data =
Temps,
main =
"Comparation between Air Cooling vs Liquid"
,
ylab =
"Temperature"
,
col =
"lightblue"
)
4
Air
Liquid
50
55
60
Comparation between Air Cooling vs Liquid
System
Temperature
9. Use TeX formatting to produce the hypothesis statements for this test. [1 mark]
H
0
:
µ
1
=
µ
2
vs
H
a
:
µ
1
̸
=
µ
2
10. Use
aggregate
to check the standard deviations of the baseline CPU temperatures, for each cooling
type [1 mark]
aggregate(Temps$Baseline ~ Temps$System,
FUN =
sd,
data =
Temps)
##
Temps$System Temps$Baseline
## 1
Air
4.449125
## 2
Liquid
3.668582
11. Use
t.test
to conduct the appropriate hypothesis test for this problem. [3 marks]
t.test(Temps$Baseline ~ Temps$System,
alternative =
"two.sided"
,
var.equal =
TRUE,
data =
Temps)
##
##
Two Sample t-test
##
## data:
Temps$Baseline by Temps$System
## t = 2.2256, df = 51, p-value = 0.03049
5
## alternative hypothesis: true difference in means between group Air and group Liquid is not equal to 0
## 95 percent confidence interval:
##
0.2429851 4.7185092
## sample estimates:
##
mean in group Air mean in group Liquid
##
55.10833
52.62759
12. Give a fully worded conclusion to this test. [2 marks]
As the p-value is above the level of significance, we fail to reject the null hypothesis.
That is, we have
insufficient evidence at this level of significance that the true mean temperatures differ for group Air and
group Liquid.
13. Use
t.test
to produce a 99% confidence interval representing the difference in mean temperatures
between Air and Liquid cooling systems. [1 mark]
t.test(Temps$Baseline ~ Temps$System,
alternative =
"two.sided"
,
var.equal =
TRUE,
data =
Temps,
conf.l
##
##
Two Sample t-test
##
## data:
Temps$Baseline by Temps$System
## t = 2.2256, df = 51, p-value = 0.03049
## alternative hypothesis: true difference in means between group Air and group Liquid is not equal to 0
## 99 percent confidence interval:
##
-0.5017584
5.4632527
## sample estimates:
##
mean in group Air mean in group Liquid
##
55.10833
52.62759
14. Could the confidence interval in Q13 have been used to conduct the hypothesis test in Q9-12? If so,
what would the conclusion be, and why? If not, why not? [2 marks]
Since this is a two-sided test, and since the confidence level (97%) and the level of significance (1%) add
up to 100%, the interval in Q13 could be used to conduct the test in Q9-12.
Because zero is include in
the confident, we fail to reject the null hypothesis.
That is, we have insufficient evidence at this level of
significance that the true mean temperatures differ for group Air and group Liquid.
6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Documents
Related Questions
Evaluate odx .
x²+1
arrow_forward
A realtor has 20 residential listings under contract. The following table shows the number of days each of those 20 houses has been on the market as of today. Use the data to complete parts d through e.
***Type an integer or a decimal***
arrow_forward
need to be converted to base 10
arrow_forward
Evaluate dr.
d.x.
12+4
arrow_forward
9:4=_:32
arrow_forward
PLEASE TYPE ONLY***
Exercise 5.3.3: Counting license plate numbers.
License plate numbers in a certain state consists of seven characters. The first character is a digit (0 through 9). The next four characters are capital letters (A through Z) and the last two characters are digits. Therefore, a license plate number in this state can be any string of the form:
Digit-Letter-Letter-Letter-Letter-Digit-Digit
(b)
How many license plate numbers are possible if no digit appears more than once?
(c)
How many license plate numbers are possible if no digit or letter appears more than once
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

Related Questions
- Evaluate odx . x²+1arrow_forwardA realtor has 20 residential listings under contract. The following table shows the number of days each of those 20 houses has been on the market as of today. Use the data to complete parts d through e. ***Type an integer or a decimal***arrow_forwardneed to be converted to base 10arrow_forward
- Evaluate dr. d.x. 12+4arrow_forward9:4=_:32arrow_forwardPLEASE TYPE ONLY*** Exercise 5.3.3: Counting license plate numbers. License plate numbers in a certain state consists of seven characters. The first character is a digit (0 through 9). The next four characters are capital letters (A through Z) and the last two characters are digits. Therefore, a license plate number in this state can be any string of the form: Digit-Letter-Letter-Letter-Letter-Digit-Digit (b) How many license plate numbers are possible if no digit appears more than once? (c) How many license plate numbers are possible if no digit or letter appears more than oncearrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
