Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Assignment 2

Please use programming to solve the following problems!

Please attach your code and the corresponding output!

1. In order to study student’s height in a certain high school, the following data is collected.

Male

Female

155.2

150.1

158.7

152.9

159.2

153.4

162.1

153.9

163.2

154.2

164.3

156.6

164.6

158.0

165.9

158.1

167.2

158.3

167.5

158.6

168.3

159.8

170.5

160.2

172.6

161.1

177.5 179.7

161.4

(a)  Assume that the population of female is normal. Construct a 95% two-sided confidence interval for the

variance of female’s population.

(b)  Assume that the population of female is normal.  Construct a 95% lower one-sided confidence interval

for the mean of female’s population.

(c)  Use Wilcoxon signed-rank test to test whether the median of female’s population is  154 under  5% significant level.  [Hint: use signrank function in Matlab].

(d)  Assume that the population of male and female are normal.  Test whether two populations have the same variance under 10% significant level.

(e)  Based on (d), test whether male have a larger mean in height than female under 10% significant level.

(f)  Based on (d), construct a 95% two-sided confidence interval for the difference between two population

means.

(g)  Use Wilcoxon rank-sum test to test whether male and female populations have the same median under

5% significant level.  [Hint: use ranksum function in Matlab]. (40 marks)

2.  The following table presents a study on the payment received by 18 faculty members for teaching a course in a large metropolitan university.

 

Subject Matter

Payment

Humanities    Social Science Engineering

2.0

2.3

2.7

2.6

2.8

3.1

2.6

2.9

3.3

3.5

3.8

3.9

2.7

3.0

3.7

2.8

3.0

3.5

(a)  Construct a one-way analysis table and comment on it based on 5% significant level.

(b)  Perform Bonferroni method at 5% significance level to determine which pairs of subjects differ in their

means. Use Matlab to get tα  if necessary.                                                                                    (16 marks)

3.  Suppose that a credit company would like to investigate the relationship between          expense of credit card per month  & annual income of young people

20 people are randomly selected, their expense and income are given below.

Expense ()

1.217

1.252

0.857

1.022

0.816

0.951

0.934

0.703

0.968

0.655

Income (α)

16.0

15.8

11.5

13.4

10.0

11.7

11.8

9.0

16.3

8.2

Expense ()

0.802

1.125

0.752

0.692

0.725

0.642

0.683

0.527

0.553

0.690

Income (α)

10.3

16.9

9.8

8.4

9.6

7.9

8.4

7.4

6.7

8.5

Expense and Income are reported in X104  RMB.

(a)  Draw a scatter plot and comment on it.  [Hint: use scatter function in Matlab].

(b)  Estimate the regression line μY |  = β0 + β1 α; construct 95% two-sided confidence intervals for β0  and β 1 ; report ∩2  and comment on it.

(c) If the regression line in (b) is used, check the normality of residuals.

(d)  Estimate the mean value of Y when α = 10.5, and construct a 95% two-sided confidence interval for it. (e)  Construct a 95% two-sided prediction interval for Y when α = 10.5. (44 marks)