11.07.2015 Views

Preface to First Edition - lib

Preface to First Edition - lib

Preface to First Edition - lib

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

58 SIMPLE INFERENCER> mooringdiff layout(matrix(1:2, ncol = 2))R> boxplot(mooringdiff, ylab = "Differences (New<strong>to</strong>n metres)",+ main = "Boxplot")R> abline(h = 0, lty = 2)R> qqnorm(mooringdiff, ylab = "Differences (New<strong>to</strong>n metres)")R> qqline(mooringdiff)BoxplotNormal Q−Q PlotDifferences (New<strong>to</strong>n metres)−0.4 0.0 0.4Differences (New<strong>to</strong>n metres)−0.4 0.0 0.4−2 −1 0 1 2Theoretical QuantilesFigure 3.5Boxplot and normal probability plot for differences between the twomooring methods.where r is the sample correlation coefficient and n is the sample size. If thepopulation correlation is zero and assuming the data have a bivariate normaldistribution, then the test statistic has a Student’s t distribution with n − 2degrees of freedom.The estimated correlation shown in Figure 3.9 is -0.655 and is highly significant.We might also be interested in the correlation between water hardnessand mortality in each of the regions North and South but we leave this as anexercise for the reader (see Exercise 3.2).3.3.4 Pis<strong>to</strong>n-ring FailuresThe first step in the analysis of the pis<strong>to</strong>nrings data is <strong>to</strong> apply the chisquaredtest for independence. This we can do in R using the chisq.testfunction. The output of the chi-squared test, see Figure 3.10, shows a valueof the X 2 test statistic of 11.722 with 6 degrees of freedom and an associated© 2010 by Taylor and Francis Group, LLC

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

Saved successfully!

Ooh no, something went wrong!