Problem #1
Problem #1
Input Output
47.5,69.5,54.7,78.3,71.6,67.4,50.6,62.4,84.7,73.8,69.0
,62.8,52.4,62.6)
x2 <-
c(52.6,59.4,80.4,70.7,86.3,75.1,62.3,68.6,86.0,80.8,67
.1,63.8,74.7,71.6,84.3,
77.1,69.9,71.1,74.2,56.7,62.9,81.7,53.1,59.6,77.2,48.0
,68.0,91.3,84.7,62.5)
x1 plot
x2 plot
-Z.test is allowed since both data are normally distributed
(z test is used since sample size is larger than 30)
data: x2
z = 2.6123, p-value = 0.008993
alternative hypothesis: true mean is not
equal to 65
95 percent confidence interval:
66.42927 75.01740
sample estimates:
mean of x
70.72333
For x1, z = -1.0589, p-value = 0.2896 For x2, z = 2.6123, p-value = 0.008993
For first sample taken in 1990,Since p=0.2896 > α = For the second sample taken in 2010,Since p=0.008993<
0.05, H0 is accepted. There is no significant difference α = 0.05, H0 is rejected. There is a significant difference
in mean body weight of male UTM students in 1990 in mean body weight of male UTM students in 2010
compared to 1970 compared to 1970.
Problem 2 - The TSP, measured in micrograms per cubic meter (mg/m3 ), is considered excessive if it exceeds 90 mg/m3 .
Air sample readings taken from 13 locations around Pasir Gudang are given in Table 2. At 0.05 level of significance, decide
if the air quality in Pasir Gudang is above the maximum acceptable level of TSP.
From this sample. It is can be known that if average(mean) air quality in 13 location is > 90 mg/m3 , it is harmful.
Also known that the significance level, α = 0.05. Decide if the air quality in Pasir Gudang is above maximum acceptable level.
Input Output
#Air sample readings taken from 13 locations around Pasir > #Air sample readings taken from 13 locations around
Gudang Pasir Gudang
> x1 <- c(89,103,85,96,98,93,85,98,97,86,105,91,100)
x1 <- c(89,103,85,96,98,93,85,98,97,86,105,91,100)
#At 0.05 level of significance, decide if the air quality in Pasir One Sample t-test
Gudang is above the maximum acceptable level of TSP using
data: x1
t-test t = 2.3094, df = 12, p-value = 0.01976
alternative hypothesis: true mean is greater than 90
t.test(x=x1, mu=90, alternative="greater", conf.level=0.95) 95 percent confidence interval:
90.98322 Inf
sample estimates:
mean of x
94.30769
Answer :
p-value = 0.01976, which is less than α = 0.05 (p-value (0.01976) < 0.05)
H0 is rejected. Average air quality of Pasir Gudang is above maximum acceptable level of Total Suspended Particulate(TSP)
Screenshot :
Problem 3 - A sample of 12 residents was asked about their satisfaction level on garbage collection services
before and after privatization by their local authority. Their rating on a 1 – 10 Likert scale, where 1 represents
“Least Satisfied” and 10 denotes “Completely Satisfied”, are given in Table 3:
At 97.5% confidence level, can we conclude that the residents are more satisfied with the garbage collection
after the privatization?
Input Output
data: aftpriv
W = 0.88032, p-value = 0.08848
Answer :
p-value = 0.9343 > α = 0.025
Hence, H0 is retained. The residents are NOT more satisfied with the garbage collection after the privatization.
However, the difference in mean between after and before is 0.58333. Shows that they ARE more satisfied with
the garbage collection after the privatization. Maybe there are errors.
Problem 4 - A study on the annual arrival of Hong Kong tourists to Penang and Johor was conducted. For each of
these states, tourist arrivals (in thousand persons/year) were recorded for six years, between 2014 and 2019.
At 0.05 level of significance, does the average annual tourist arrival from Hong Kong is higher for Penang than for
Johor?
Input Output
Thus, H0 is rejected. The average annual tourist arrival from Hong Kong is higher for Penang than for Johor