1
$\begingroup$

I have limited information with which to compare two means, is it still possible in R?

We have a group of students (1,000 students) about whom we have mean and standard deviation information, and we did an experiment on a sub-set of them (again we have mean and standard deviation on this subset). I do not, however, have data on the individual students.

For example,

All Students (SD), Experiment Students (SD)

Age 14 (.5), 15.5 (1)

Caucasian 22%, 35%

African American 41%, 39%

Is there a command to compare, as a t-test, the two means when the only information I have is the mean, standard deviation, and sample size? My understanding from R is that t.test(a, mu) looks at all 'a' values for observations in a column of a dataframe, it does not expect a mean value to be input. I get an error when it tried.

Further, how does R cope with variables that are not means but percentages, for example the race/ethnicity data?

$\endgroup$
3
  • $\begingroup$ This is gonna be tough, is there no way of getting the data of the individuals? Alternatively you may try to simulate some data to have exactly that mean and deviance and then run a t-test. $\endgroup$ Commented Dec 3, 2018 at 7:09
  • $\begingroup$ Do you know the group size of the experimental sub-set? Is 14 the mean of all students or the mean of the control group (i.e. all students not in the sub-set)? $\endgroup$
    – Niek
    Commented Dec 3, 2018 at 7:57
  • $\begingroup$ Comments in this post suggest a couple of packages. Alternatively several posts on site give ways to simulate data that has exactly the same sample mean and variance as the sample, which while somewhat roundabout would work. On the third hand, simply writing a function to do it directly is a matter of moments. $\endgroup$
    – Glen_b
    Commented Dec 3, 2018 at 10:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.