16

I want to perform a two-sample T-test to test for a difference between two independent samples which each sample abides by the assumptions of the T-test (each distribution can be assumed to be independent and identically distributed as Normal with equal variance). The only complication from the basic two-sample T-test is that the data is weighted. I am using weighted means and standard deviations, but weighted N's will artificially inflate the size of the sample, hence bias the result. Is it simply a case of replacing the weighted Ns with the unweighted Ns?

  • What is N? What is the nature of the weighting scheme? Are the weights known? –  Aug 04 '10 at 01:25
  • see also this related question: http://stats.stackexchange.com/questions/856/fishers-exact-test-with-weights – Henrik Aug 04 '10 at 11:22
  • If you use R, try weights::wtd.t.test or sjstats::survey_median. The second package also has weighted chi-square and mann whitney. – arielhasidim Dec 21 '23 at 12:51

1 Answers1

8

Use regression methods. A simple linear regression with group coded as 0-1 (or 1-2, etc) is equivalent to a t-test, but regression software usually has the capability to incorporate weigths correctly.

Aniko
  • 11,014