+ Reply to Thread
Results 1 to 10 of 10

t-test with multiple samples

Hybrid View

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    MA,US
    MS-Off Ver
    Excel 2011
    Posts
    9

    t-test with multiple samples

    I'm having problems with writing a formula to do t-test (paired two-tailed) on numbers in Excel columns A and B corresponding to a column of different samples (C) (see below). I want the output to report the p-values in one column corresponding to H1,H2, and H3. Thanks for any help.

    A B C(samples)
    0 0 H1
    283 5 H1
    16 0 H1
    71 5 H1
    34 1 H1
    52 2 H1
    93 17 H1
    39 2 H2
    10 0 H2
    35 2 H2
    59 1 H2
    20 6 H2
    2 34 H3
    4 31 H3
    3 21 H3
    8 17 H3

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: t-test with multiple samples

    I'm assuming you want to use the TTEST formula, and have the results output somewhere...however, the formula requires 4 inputs, and without a sample of what you have, and expect to see, it is difficult to give you an answer, an example workbook would help immensely !

  3. #3
    Registered User
    Join Date
    10-29-2012
    Location
    MA,US
    MS-Off Ver
    Excel 2011
    Posts
    9

    Re: t-test with multiple samples

    ok, so here's my excel spreadsheet of the samples. i want to return the p-values in column F. I did the t-test one sample at a time to show you what I mean. Let me know if you get the attachment.
    Attached Files Attached Files

  4. #4
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: t-test with multiple samples

    okay i think i get what you mean, try this :

    (cell F2) =TTEST(IF(C2:C17="H1",A2:A17),IF(C2:C17="H1",B2:B17),2,1), "<shift>+<cntrl>+<Enter>"
    (cell F3) =TTEST(IF(C2:C17="H2",A2:A17),IF(C2:C17="H2",B2:B17),2,1), "<shift>+<cntrl>+<Enter>"
    (cell F4) =TTEST(IF(C2:C17="H3",A2:A17),IF(C2:C17="H3",B2:B17),2,1), "<shift>+<cntrl>+<Enter>"

    these are array formulas, so you have to use the "<shift>+<cntrl>+<Enter>" to enter them
    hope this helps

  5. #5
    Registered User
    Join Date
    10-29-2012
    Location
    MA,US
    MS-Off Ver
    Excel 2011
    Posts
    9

    Re: t-test with multiple samples

    hey, this works great!! thanks a lot. I've been trying to write a formula for days...

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: t-test with multiple samples

    @ Midna

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  7. #7
    Registered User
    Join Date
    10-29-2012
    Location
    MA,US
    MS-Off Ver
    Excel 2011
    Posts
    9

    Re: t-test with multiple samples

    ok, sorry about that. i see the thread tool,but do not know exactly what you are referring to about the 'small star icon located in the lower left corner of the post'. i definitely would like to give thanks.

  8. #8
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: t-test with multiple samples

    its on the bottom left side of the post, in the (on my computer) grey area opposite Reply/Reply with Qoutes/Multi Qout.. options,

  9. #9
    Registered User
    Join Date
    10-29-2012
    Location
    MA,US
    MS-Off Ver
    Excel 2011
    Posts
    9

    Re: t-test with multiple samples

    yep, found it. hope i did it right.

  10. #10
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: t-test with multiple samples

    thanks Midna, and yes, looks like you did
    no worries though, just glad i could answer your question

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1