Backgrounds: Although many disease-associated common variants have been discovered through genome-wide association studies, much of the genetic effects of complex diseases have not been explained. Population-based association studies are vulnerable to population stratification. A possible solution is to use family-based tests. However, if tests only estimate the genetic effect from the within-family variation to avoid population stratification, they may ignore the useful genetic information from between-family variation and lose power. Methods: We have developed an adaptive weighted sum test for family-based association studies. The new test uses data driven weights to combine two test statistics, and the weights measure the strength of population stratification. When population stratification is strong, the proposed test will automatically put more weight on one statistic derived from within-family variation to maintain robustness against spurious positives. On the other hand, when the effect of population stratification is relatively weak, the proposed test will automatically put more weight on the other statistic derived from both within-family and between-family variation to make use of both sources of genetic variation; and at the same time, the degrees of freedom of the test will be reduced and power of the test will be increased. Results: In our study, the proposed method achieves a higher power in most scenarios of linkage disequilibrium structure as well as Hap Map data from different genes under different population structures while still keeping its robustness against population stratification.