Vous êtes sur la page 1sur 4

Lecturer: Lszl Koltay , max 30 points

1. Answer the questions!


a) When is an estimate called unbiased?
(3p)
The expected value of the estimator statistic is the estimated parameter.
Yes or No
b) Having n observed value of a RV, the estimate
(3p)

m x 1 xi
n

is unbiased

or

biased

Underline the correct answer!


c) Testing a hypothesis what are the wrong decisions and when do they
occur?
(4p)
Error type I: rejecting the null-hypotheses when it is true
Error type II: accepting the null-hypotheses when it is when it is false

Using R answer the questions


2. In two petrol stations the number of customers buying different kind of
fuel were recorded during a week:
Petrol

Diesel

E85

Station A

855

345

25

Station B

637

210

10

a) At least how much proportion of the customers in station A are buying fuel
E85 with confidence level 95%?
(3p)
Command: >
prop.test(25,855+345+25,alternative="greater",conf.level=0.95)
P 0.014 (1.4%)

b) Can we state that third of the customers are buying diesel fuel in station
B?
(3p)
Command

> prop.test(210,637+210+10,p=1/3)

p-value = 5.129e-08

Decision: NO we cant

3. Average prices for a litre of unleaded petrol in the United Kingdom:


Month

2012

2013

January

133.3

132.7

135.1

137.1

138.9

138.8

141.9

136.7

137.9

133.9

133.1

134.6

132.1

135.7

135.9

137.5

Septembe

139.6

137.7

October

138.5

132.4

135.3

130.6

132.7

131.0

Febuary
March
April
May
June
July
August

November
December

Store the data in the vectors Y12 and Y13 for the years 2012 and 2013
respectively in the order of the months.

a) Give the 90% level confidence limits for the mean price in 2013.
(2p)
Command: > t.test(Y13,conf.level=0.9)
90% limits: 133.4556

136.3278

b) Can we state that the prices month by month are similar?


(2p)
Command: > t.test(Y12,Y13,paired=TRUE)
Test statistic: t=1.4196
p- value: 0.1834
accepted

Decision: YES as H0: m=0

c) If there is no significant difference between the monthly data, calculate


the probability of the type II error if the monthly prices are lower in 2013 by 3
pence as an average.
(4p)
SE of the mean of the monthly differences: > SE= sd(Y12Y13)/sqrt(12)= 0.9157709
Command: > pt(1.4196,ncp=-3/SE,df=11)-pt(-1.4196,ncp=3/SE,df=11)
= 0.03537574
4. Use the data of the year 2013 in problem 3.
a) Store the names of the seasons as:
(1p)
Months 01,02,12

winter

Months 03,04,05

spring

Months 06,07,08

summer

Months 09,10,11

fall

Command:

>
Season=c(rep("winter",2),rep("spring",3),rep("summer",3),rep("fall",3),"winte
r")

b) Check the equality of the variances for the four seasons.


(2p)
Command: > > bartlett.test(Y13~Season)
p-value = 0.7172
ACCEPTED

Decision: the equality of the variances

c) Can we state that there is no significant difference among the seasons


mean prices?
(3p)
Command: > oneway.test(Y13~Season,var.equal=TRUE)
Or

> summary(aov(Y13~Season))

ANOVA table:
Df

Sum Sq

Mean Sq

F value

Pr(>F
)

Season

20.97

6.99

0.881

0.49

Residuals

63.44

7.93

Decision: YES

Vous aimerez peut-être aussi