10.07.2015 Views

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Using</strong> R <strong>for</strong> introductory statistics 202P(X (j) ≤M≤X (n+1−j) )≥1−α. In terms of T, this becomes the largest j so that P(j≤T≤n−j)>1−α,which in turn becomes a search <strong>for</strong> the largest j with P(T n = length(x)> pbinom(0:n,n,1/2) # P(T sort(x)[c(j,n+1−j)][1] 4.3 540.07.6.2 Confidence intervals based on signed-rank statisticThe Wilcoxon signed-rank statistic allows <strong>for</strong> an improvement on the confidence intervalgiven by counting the number of data points above the median. Its usage is valid whenthe X i are assumed to be symmetric about their median. If this is so, then a data point isequally likely to be on the left or right of the median, and the distance from the median isindependent of what side of the median the data point is on. If we know the median thenwe can rank the data by distance to the median. Add up the ranks <strong>for</strong> the values where the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!