TU Wien:Statistik und Wahrscheinlichkeitstheorie UE (Levajkovic)/Übungen 2023W/HW08.4

Aus VoWi
Zur Navigation springen Zur Suche springen
One-sample confidence intervals
(a) Let be Student’s -confidence interval for the expectation, while is the -quantile of the -distribution (for ).
Comment on the following statements:
i. At level the confidence interval I is smaller than at level 5%
ii. The sample size is
iii. If the sample size is doubled, then the width of the confidence interval is halved
iv. The probability to find the expectation left of I is at the most
v. If I overlaps the expectation, then the null hypothesis is not significant.
(b) Messages are regularly sent from a sender to a receiver. For randomly chosen messages the transfer times were measured and stored in the file waitingtimes.Rdata.
i. Represent the data in a histogram. Is the distribution approximately bell-shaped?
ii. Construct an approximate 99%-confidence interval for the expectation and plot it into the graphic.
iii. An engineer claims that the mean transfer time is 1.5 seconds. Are the measurements compatible with this statement?
Dieses Beispiel ist als solved markiert. Ist dies falsch oder ungenau? Aktualisiere den Lösungsstatus (Details: Vorlage:Beispiel)


Lösungsvorschlag von Lessi[Bearbeiten | Quelltext bearbeiten]

--Lessi 2024-02-07T13:04:11Z


a)[Bearbeiten | Quelltext bearbeiten]

i. At the confidence interval is smaller than at level .[Bearbeiten | Quelltext bearbeiten]

If we decrease the quantile decreases and increases, thus widening the interval, so at it is smaller than at

ii. The sample size is [Bearbeiten | Quelltext bearbeiten]

If we consider a -distribution then is the degrees of freedom and would be the sample size.

iii. If the sample size is doubled, then the width of the confidence interval is halved[Bearbeiten | Quelltext bearbeiten]

Not necessarily. In most cases the significance only affects the interval size in some proportion but not directly

iv. The probability to find the expectation left of is at the most [Bearbeiten | Quelltext bearbeiten]

Under the probability that C.I. overlaps is . Therefore the probability that is not within C.I. is

v. If overlaps the expectation, then the null hypothesis is not significant.[Bearbeiten | Quelltext bearbeiten]

This makes no sense. We don't make any significance statement on the hypothesis. Though we accept if lies within the C.I.

b)[Bearbeiten | Quelltext bearbeiten]

load('./waitingtimes.Rdata')

# i. Represent the data in a histogram. Is the distribution approximately bell-shaped?
hist(wz, breaks = seq(min(wz) - 1, max(wz) + 1, 0.5))

# not bell shaped

# ii.

alpha <- 0.01

length(wz)
m <- mean(wz)
s <- sd(wz)
sem <- s / sqrt(length(wz))
q <- qnorm(1 - (alpha / 2))

lower <- m - q * sem
upper <- m + q * sem

abline(v=m, col='red')
arrows(lower, 15, upper, 15, code=3, length=0.1, angle=90)
text(1.5, 16, "99% - C.I.")
text(m + 0.1, 20, expression(bar(x)), col='red')

# iii.

abline(v=1.5, col='blue')
text(1.6, 20, expression(mu[0]), col='blue')

# it is outside the C.I. so we reject it