2
$\begingroup$

I have some data samples collected about the weight loss (in pounds) for a set of 27 persons:

[1] 12  5  9  0 18  7  0 14  1 14  0  0 13 11 11  8 10 13 13  6  0 14  0 10  1
[26] 10  4

I would like to apply hypothesis testing in this case, and because I am a newbie in this thing I found some information in this link:

http://statistics.about.com/od/Inferential-Statistics/a/An-Example-Of-A-Hypothesis-Test.htm

The hypothesis that I made at the beginning of the trials was that less of the 50% of the individuals tested will lose more than 10 pounds. As we can see from the data only approximately 37% of the persons under study reached that quantity (lose more than 10 pounds)

I have made some plots to check if my data falls into the normal distribution:

density(n);
plot(density(n))

which gives me this plot:

enter image description here

but when I use the log data I got this:

plot(density(log(n)))

enter image description here

For what I see is skewed to the right. I tried to use qqplot and these are the results:

qqnorm(n);qqline(n)

enter image description here

My hypothesis are the following:

Alternative hypothesis: Less than 50% of the persons in our study will have a weight loss of 11 or more pounds:

x>10

Null hypothesis: More than 50 of the persons in our study will have a weight loss below 11 pounds:

x<=10

I will be using an alpha value of 0.05, and I have calculated the standard error:

std<-function(n) sd(n)/sqrt(length(n))

I got the value of:

1.091711

According to the link what I should do is:

number of people that lose more than 10 pounds=10

number of people that failed=17

(17-10)/1.091711=6.41

at this point I am stucked, is it ok the analysis I made so far? and how I can finish it to see if I should reject or not the null hypothesis?

$\endgroup$

1 Answer 1

7
$\begingroup$

First, let's rephrase your alternative hypothesis. You phrased it as "less than 50% of the individuals tested..." But by talking specifically about the individuals tested, we know whether it's true or not (just count the individuals!) Thus it's misleading to say we're "testing" that hypothesis.

Instead, let's phrase your alternative as: "The probability of successfully losing more than 10 pounds in this trial is less than 50%." Then we have a random sample from a population, and we can test your hypotheses.

At this point we have a binomial test. Out of 27 trials, we have 10 successes, and we want to know if this is significantly fewer than would have been expected by chance if the probability of success is 50%. We can do this in R with the binom.test function:

binom.test(10, 27, .5, alternative = "less")

This produces the result:

    Exact binomial test

data:  10 and 27
number of successes = 10, number of trials = 27, p-value = 0.1239
alternative hypothesis: true probability of success is less than 0.5
95 percent confidence interval:
 0.0000000 0.5466402
sample estimates:
probability of success 
             0.3703704 

Your p-value is reported as 0.1239. Thus, you cannot reject the null hypothesis (at an alpha of .05) that the probability of losing weight in the trial is 50%.

Note: 6 people had a weight loss of 0 recorded, and no one had a negative value. Either that means that no one gained weight during the study (which seems unlikely), or more likely your data is censored: anyone who gained weight was considered to have "lost 0 pounds". This is not a problem for the above hypothesis test (0 is <= 10, and so is any negative value!) but it means your density plot above doesn't mean much (that's why there's a peak at 0: otherwise the amount of weight lost might look more normal).

$\endgroup$
2
  • $\begingroup$ thanks @DavidRobinson, so that means that I failed to reject the null hypotheses because there is not enough evidence available? saying in other words "there is not enough evidence that could sustain that more than 50% of the people would lose more than 10 pounds", is it well said that? $\endgroup$
    – Layla
    Commented Mar 24, 2015 at 19:34
  • 1
    $\begingroup$ @Nadine That's right that you failed to reject the null hypothesis. But what do you mean that could sustain that more than 50%... that sounds like the opposite of what you were saying. I would say "There is not evidence that the probability of losing more than 10 pounds in this trial was less than 50%." $\endgroup$ Commented Mar 24, 2015 at 19:52

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.