You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -852,7 +817,7 @@ xtable(cell,caption="Cellularity at two sites of disesase",label="cellularity")
852
817
@
853
818
854
819
\textbf{Example}: 20 patients with advanced cancer were studied using MRI imaging. Cellularity was measured for each individual patient by estimating water movement. We want to know whether there is a significant difference in the cellularity between two sites in the body; A and B. The data are shown in Table \ref{cellularity}. We want to test the \textbf{null hypothesis} that the mean cellularity at site A is equal to the mean cellularity at site B. This is like saying:\\
855
-
>>>>>>> gh-pages
820
+
856
821
857
822
Mean cellularity at site A = mean cellularity at site B\\
858
823
@@ -897,22 +862,15 @@ Click on the View data set button to check if the Difference column has been add
In the calculation of the difference between Site A and Site B column, we need to choose either one as our baseline; this will simply determine whether we calculate A-B or B-A. The results of the paired t-test will be the same either way, but summary statistics such as the mean and confidence intervals will be either positive or negative depending on which column you choose as your baseline, and similarly the histogram with be either on the positive or negative scale (the overall shape will be identical but will be flipped on the vertical axis). In this example, the A column was used as the baseline, so the difference column calculated represents the calculation B-A. \newpage
904
-
>>>>>>> gh-pages
905
867
906
868
907
869
One can then draw a histogram of the paired differences (see Figure \ref{histOfDifferences}):\\
\textit{Note that the histogram will be flipped on the vertical axis if the difference is calculated as B - A rather than A - B, but this won't impact the end result of the test.}\newpage
941
-
>>>>>>> gh-pages
942
897
943
898
944
899
If satisfied with the normality assumption, we can go ahead with the paired two-sample t-test (Figure \ref{doPairedTTest}).
@@ -950,11 +905,7 @@ If satisfied with the normality assumption, we can go ahead with the paired two-
950
905
\end{figure}
951
906
952
907
<<>>=
953
-
<<<<<<<HEAD
954
-
t.test(cell$Peritoneal,cell$Ovarian,paired=TRUE)
955
-
=======
956
908
t.test(cell$B,cell$A,paired=TRUE)
957
-
>>>>>>>gh-pages
958
909
@
959
910
The mean difference in cellularity between the two sites of disease was 19.14 units. The corresponding t-statistic is:
Under the null hypothesis that there is no difference in the cellularities between the two sites of disease, we can see that the probability of observing such a large t-statistic is very small: the p-value is 0.0017. \\
This is a significant result (p $<$ 0.05), so there is \textbf{evidence of a difference} in the cellularity between Site A and Site B in patients with advanced cancer.
970
-
>>>>>>> gh-pages
971
919
\\
972
920
\subsection{What to do if the normality assumption is unreasonable?}
0 commit comments