|
Dear List,
Why are my hand calculations for a one-sample t-test different than those outputted by the t-test command? Key to Variables: G_P = Grade Point --- Individual Student Grade (A = 4, B = 3, C = 2, D = 1, F = 0) {Raw Scores} GPAPC = Grade Point Average Per Course [Average GPA By Course - All Instructors] {Population Mean} SD_GPAPC = Standard Deviation for Grade Points Per Course {Population Standard Deviation} I_AGPC = Instructor Average Grade Per Course [e.g. if taught 2 sections of English 101, the average GPA for all put together] {Sample Mean} I_SD_GPC = Instructor Standard Deviation Grades Per Course {Sample Standard Deviation} n = {sample size} * This code.... compute TTest1 = (I_Avg_Grade_Per_Course - Avg_Grade_Per_Course) / (I_SD_Grade_Per_Course /sqrt(I_Cnt_Grade_Per_Course)). * ....Yields this result: -0.1249 . * Whereas this command...... t-test testval 2.62 /variables = G_P /criteria = ci (.90). *....Yields these results: . One-Sample Statistics N Mean Std. Deviation Std. Error Mean Grade_Point 52 2.5962 1.65990 .23019 One-Sample Test Test Value = 2.62 90% Confidence Interval of the Difference t df Sig. (2-tailed) Mean Difference Lower Upper -.104 51 .918 -.02385 -.4095 .3618 -.125 versus -.104. seems like a big enough difference that I'm concerned whether I'm missing anything. How complicated can a t-test be? You can see that I compute it on a row-by row level using aggregate values, but they should be the same numbers that SPSS is using (which you can verify by calculating the sample mean & std dev.), right? Thanks for any insight you can lend, -Gary . Data: (G_P .00 = 0 ; there are no missing values for G_P) id G_P GPAPC SD_GPAPC I_AGPC I_SD_GPC n 1.00 .00 2.62 1.71 2.60 1.66 52 2.00 .00 2.62 1.71 2.60 1.66 52 3.00 3.00 2.62 1.71 2.60 1.66 52 4.00 2.00 2.62 1.71 2.60 1.66 52 5.00 4.00 2.62 1.71 2.60 1.66 52 6.00 3.00 2.62 1.71 2.60 1.66 52 7.00 .00 2.62 1.71 2.60 1.66 52 8.00 3.00 2.62 1.71 2.60 1.66 52 9.00 4.00 2.62 1.71 2.60 1.66 52 10.00 .00 2.62 1.71 2.60 1.66 52 11.00 .00 2.62 1.71 2.60 1.66 52 12.00 3.00 2.62 1.71 2.60 1.66 52 13.00 2.00 2.62 1.71 2.60 1.66 52 14.00 .00 2.62 1.71 2.60 1.66 52 15.00 4.00 2.62 1.71 2.60 1.66 52 16.00 3.00 2.62 1.71 2.60 1.66 52 17.00 4.00 2.62 1.71 2.60 1.66 52 18.00 .00 2.62 1.71 2.60 1.66 52 19.00 4.00 2.62 1.71 2.60 1.66 52 20.00 .00 2.62 1.71 2.60 1.66 52 21.00 2.00 2.62 1.71 2.60 1.66 52 22.00 4.00 2.62 1.71 2.60 1.66 52 23.00 .00 2.62 1.71 2.60 1.66 52 24.00 3.00 2.62 1.71 2.60 1.66 52 25.00 3.00 2.62 1.71 2.60 1.66 52 26.00 4.00 2.62 1.71 2.60 1.66 52 27.00 4.00 2.62 1.71 2.60 1.66 52 28.00 4.00 2.62 1.71 2.60 1.66 52 29.00 .00 2.62 1.71 2.60 1.66 52 30.00 4.00 2.62 1.71 2.60 1.66 52 31.00 3.00 2.62 1.71 2.60 1.66 52 32.00 4.00 2.62 1.71 2.60 1.66 52 33.00 4.00 2.62 1.71 2.60 1.66 52 34.00 .00 2.62 1.71 2.60 1.66 52 35.00 4.00 2.62 1.71 2.60 1.66 52 36.00 3.00 2.62 1.71 2.60 1.66 52 37.00 4.00 2.62 1.71 2.60 1.66 52 38.00 .00 2.62 1.71 2.60 1.66 52 39.00 4.00 2.62 1.71 2.60 1.66 52 40.00 4.00 2.62 1.71 2.60 1.66 52 41.00 1.00 2.62 1.71 2.60 1.66 52 42.00 4.00 2.62 1.71 2.60 1.66 52 43.00 4.00 2.62 1.71 2.60 1.66 52 44.00 3.00 2.62 1.71 2.60 1.66 52 45.00 4.00 2.62 1.71 2.60 1.66 52 46.00 4.00 2.62 1.71 2.60 1.66 52 47.00 4.00 2.62 1.71 2.60 1.66 52 48.00 2.00 2.62 1.71 2.60 1.66 52 49.00 .00 2.62 1.71 2.60 1.66 52 50.00 4.00 2.62 1.71 2.60 1.66 52 51.00 4.00 2.62 1.71 2.60 1.66 52 52.00 4.00 2.62 1.71 2.60 1.66 52 Number of cases read: 52 Number of cases listed: 52 ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
You hand formula says to divide by the standard error of the instructor
variable when you should be dividing by the standard error of the difference. Paul R. Swank, Ph.D. Professor and Director of Research Children's Learning Institute University of Texas Health Science Center - Houston -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Hal 9000 Sent: Wednesday, July 23, 2008 6:03 PM To: [hidden email] Subject: Syntax Calculated 1 Sample T-Test Value Different than SPSS's (?) Dear List, Why are my hand calculations for a one-sample t-test different than those outputted by the t-test command? Key to Variables: G_P = Grade Point --- Individual Student Grade (A = 4, B = 3, C = 2, D = 1, F = 0) {Raw Scores} GPAPC = Grade Point Average Per Course [Average GPA By Course - All Instructors] {Population Mean} SD_GPAPC = Standard Deviation for Grade Points Per Course {Population Standard Deviation} I_AGPC = Instructor Average Grade Per Course [e.g. if taught 2 sections of English 101, the average GPA for all put together] {Sample Mean} I_SD_GPC = Instructor Standard Deviation Grades Per Course {Sample Standard Deviation} n = {sample size} * This code.... compute TTest1 = (I_Avg_Grade_Per_Course - Avg_Grade_Per_Course) / (I_SD_Grade_Per_Course /sqrt(I_Cnt_Grade_Per_Course)). * ....Yields this result: -0.1249 . * Whereas this command...... t-test testval 2.62 /variables = G_P /criteria = ci (.90). *....Yields these results: . One-Sample Statistics N Mean Std. Deviation Std. Error Mean Grade_Point 52 2.5962 1.65990 .23019 One-Sample Test Test Value = 2.62 90% Confidence Interval of the Difference t df Sig. (2-tailed) Mean Difference Lower Upper -.104 51 .918 -.02385 -.4095 .3618 -.125 versus -.104. seems like a big enough difference that I'm concerned whether I'm missing anything. How complicated can a t-test be? You can see that I compute it on a row-by row level using aggregate values, but they should be the same numbers that SPSS is using (which you can verify by calculating the sample mean & std dev.), right? Thanks for any insight you can lend, -Gary . Data: (G_P .00 = 0 ; there are no missing values for G_P) id G_P GPAPC SD_GPAPC I_AGPC I_SD_GPC n 1.00 .00 2.62 1.71 2.60 1.66 52 2.00 .00 2.62 1.71 2.60 1.66 52 3.00 3.00 2.62 1.71 2.60 1.66 52 4.00 2.00 2.62 1.71 2.60 1.66 52 5.00 4.00 2.62 1.71 2.60 1.66 52 6.00 3.00 2.62 1.71 2.60 1.66 52 7.00 .00 2.62 1.71 2.60 1.66 52 8.00 3.00 2.62 1.71 2.60 1.66 52 9.00 4.00 2.62 1.71 2.60 1.66 52 10.00 .00 2.62 1.71 2.60 1.66 52 11.00 .00 2.62 1.71 2.60 1.66 52 12.00 3.00 2.62 1.71 2.60 1.66 52 13.00 2.00 2.62 1.71 2.60 1.66 52 14.00 .00 2.62 1.71 2.60 1.66 52 15.00 4.00 2.62 1.71 2.60 1.66 52 16.00 3.00 2.62 1.71 2.60 1.66 52 17.00 4.00 2.62 1.71 2.60 1.66 52 18.00 .00 2.62 1.71 2.60 1.66 52 19.00 4.00 2.62 1.71 2.60 1.66 52 20.00 .00 2.62 1.71 2.60 1.66 52 21.00 2.00 2.62 1.71 2.60 1.66 52 22.00 4.00 2.62 1.71 2.60 1.66 52 23.00 .00 2.62 1.71 2.60 1.66 52 24.00 3.00 2.62 1.71 2.60 1.66 52 25.00 3.00 2.62 1.71 2.60 1.66 52 26.00 4.00 2.62 1.71 2.60 1.66 52 27.00 4.00 2.62 1.71 2.60 1.66 52 28.00 4.00 2.62 1.71 2.60 1.66 52 29.00 .00 2.62 1.71 2.60 1.66 52 30.00 4.00 2.62 1.71 2.60 1.66 52 31.00 3.00 2.62 1.71 2.60 1.66 52 32.00 4.00 2.62 1.71 2.60 1.66 52 33.00 4.00 2.62 1.71 2.60 1.66 52 34.00 .00 2.62 1.71 2.60 1.66 52 35.00 4.00 2.62 1.71 2.60 1.66 52 36.00 3.00 2.62 1.71 2.60 1.66 52 37.00 4.00 2.62 1.71 2.60 1.66 52 38.00 .00 2.62 1.71 2.60 1.66 52 39.00 4.00 2.62 1.71 2.60 1.66 52 40.00 4.00 2.62 1.71 2.60 1.66 52 41.00 1.00 2.62 1.71 2.60 1.66 52 42.00 4.00 2.62 1.71 2.60 1.66 52 43.00 4.00 2.62 1.71 2.60 1.66 52 44.00 3.00 2.62 1.71 2.60 1.66 52 45.00 4.00 2.62 1.71 2.60 1.66 52 46.00 4.00 2.62 1.71 2.60 1.66 52 47.00 4.00 2.62 1.71 2.60 1.66 52 48.00 2.00 2.62 1.71 2.60 1.66 52 49.00 .00 2.62 1.71 2.60 1.66 52 50.00 4.00 2.62 1.71 2.60 1.66 52 51.00 4.00 2.62 1.71 2.60 1.66 52 52.00 4.00 2.62 1.71 2.60 1.66 52 Number of cases read: 52 Number of cases listed: 52 ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Paul, thanks for your reply.
This is a 1 sample t-test - isn't the denominator the sample sd divided by the square root of the sample size? -Gary On Wed, Jul 23, 2008 at 4:26 PM, Swank, Paul R <[hidden email]> wrote: > You hand formula says to divide by the standard error of the instructor > variable when you should be dividing by the standard error of the > difference. > > Paul R. Swank, Ph.D. > Professor and Director of Research > Children's Learning Institute > University of Texas Health Science Center - Houston > > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of > Hal 9000 > Sent: Wednesday, July 23, 2008 6:03 PM > To: [hidden email] > Subject: Syntax Calculated 1 Sample T-Test Value Different than SPSS's > (?) > > Dear List, > > Why are my hand calculations for a one-sample t-test different than > those outputted by the t-test command? > > Key to Variables: > > G_P = Grade Point --- Individual Student Grade (A = 4, B = > 3, C = 2, D = 1, F = 0) {Raw Scores} > GPAPC = Grade Point Average Per Course [Average GPA By Course - > All Instructors] {Population Mean} > SD_GPAPC = Standard Deviation for Grade Points Per Course {Population > Standard Deviation} > I_AGPC = Instructor Average Grade Per Course [e.g. if taught 2 > sections of English 101, the average GPA for all put together] {Sample > Mean} > I_SD_GPC = Instructor Standard Deviation Grades Per Course {Sample > Standard Deviation} > n = {sample size} > > * This code.... > compute TTest1 = > (I_Avg_Grade_Per_Course - Avg_Grade_Per_Course) > / (I_SD_Grade_Per_Course /sqrt(I_Cnt_Grade_Per_Course)). > > * ....Yields this result: -0.1249 . > > * Whereas this command...... > > t-test testval 2.62 > /variables = G_P > /criteria = ci (.90). > > *....Yields these results: . > > One-Sample Statistics > N Mean Std. Deviation Std. Error Mean > Grade_Point 52 2.5962 1.65990 .23019 > > > One-Sample Test > Test Value = 2.62 > 90% Confidence Interval of the Difference > t df Sig. (2-tailed) Mean Difference Lower Upper > -.104 51 .918 -.02385 -.4095 .3618 > > > -.125 versus -.104. seems like a big enough difference that I'm > concerned whether I'm missing anything. How complicated can a t-test > be? You can see that I compute it on a row-by row level using > aggregate values, but they should be the same numbers that SPSS is > using (which you can verify by calculating the sample mean & std > dev.), right? > > Thanks for any insight you can lend, > > -Gary > > . > Data: (G_P .00 = 0 ; there are no missing values for G_P) > > > id G_P GPAPC SD_GPAPC I_AGPC > I_SD_GPC n > > 1.00 .00 2.62 1.71 > 2.60 1.66 52 > 2.00 .00 2.62 1.71 > 2.60 1.66 52 > 3.00 3.00 2.62 1.71 > 2.60 1.66 52 > 4.00 2.00 2.62 1.71 > 2.60 1.66 52 > 5.00 4.00 2.62 1.71 > 2.60 1.66 52 > 6.00 3.00 2.62 1.71 > 2.60 1.66 52 > 7.00 .00 2.62 1.71 > 2.60 1.66 52 > 8.00 3.00 2.62 1.71 > 2.60 1.66 52 > 9.00 4.00 2.62 1.71 > 2.60 1.66 52 > 10.00 .00 2.62 1.71 > 2.60 1.66 52 > 11.00 .00 2.62 1.71 > 2.60 1.66 52 > 12.00 3.00 2.62 1.71 > 2.60 1.66 52 > 13.00 2.00 2.62 1.71 > 2.60 1.66 52 > 14.00 .00 2.62 1.71 > 2.60 1.66 52 > 15.00 4.00 2.62 1.71 > 2.60 1.66 52 > 16.00 3.00 2.62 1.71 > 2.60 1.66 52 > 17.00 4.00 2.62 1.71 > 2.60 1.66 52 > 18.00 .00 2.62 1.71 > 2.60 1.66 52 > 19.00 4.00 2.62 1.71 > 2.60 1.66 52 > 20.00 .00 2.62 1.71 > 2.60 1.66 52 > 21.00 2.00 2.62 1.71 > 2.60 1.66 52 > 22.00 4.00 2.62 1.71 > 2.60 1.66 52 > 23.00 .00 2.62 1.71 > 2.60 1.66 52 > 24.00 3.00 2.62 1.71 > 2.60 1.66 52 > 25.00 3.00 2.62 1.71 > 2.60 1.66 52 > 26.00 4.00 2.62 1.71 > 2.60 1.66 52 > 27.00 4.00 2.62 1.71 > 2.60 1.66 52 > 28.00 4.00 2.62 1.71 > 2.60 1.66 52 > 29.00 .00 2.62 1.71 > 2.60 1.66 52 > 30.00 4.00 2.62 1.71 > 2.60 1.66 52 > 31.00 3.00 2.62 1.71 > 2.60 1.66 52 > 32.00 4.00 2.62 1.71 > 2.60 1.66 52 > 33.00 4.00 2.62 1.71 > 2.60 1.66 52 > 34.00 .00 2.62 1.71 > 2.60 1.66 52 > 35.00 4.00 2.62 1.71 > 2.60 1.66 52 > 36.00 3.00 2.62 1.71 > 2.60 1.66 52 > 37.00 4.00 2.62 1.71 > 2.60 1.66 52 > 38.00 .00 2.62 1.71 > 2.60 1.66 52 > 39.00 4.00 2.62 1.71 > 2.60 1.66 52 > 40.00 4.00 2.62 1.71 > 2.60 1.66 52 > 41.00 1.00 2.62 1.71 > 2.60 1.66 52 > 42.00 4.00 2.62 1.71 > 2.60 1.66 52 > 43.00 4.00 2.62 1.71 > 2.60 1.66 52 > 44.00 3.00 2.62 1.71 > 2.60 1.66 52 > 45.00 4.00 2.62 1.71 > 2.60 1.66 52 > 46.00 4.00 2.62 1.71 > 2.60 1.66 52 > 47.00 4.00 2.62 1.71 > 2.60 1.66 52 > 48.00 2.00 2.62 1.71 > 2.60 1.66 52 > 49.00 .00 2.62 1.71 > 2.60 1.66 52 > 50.00 4.00 2.62 1.71 > 2.60 1.66 52 > 51.00 4.00 2.62 1.71 > 2.60 1.66 52 > 52.00 4.00 2.62 1.71 > 2.60 1.66 52 > > > Number of cases read: 52 Number of cases listed: 52 > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
| Free forum by Nabble | Edit this page |
