-1

I have a vector with 385 numbers ranging from 2000 to 5200 and I am asked to test whether the mean is greater than 5500. I tried this:

t.test(tabla2$`Precio max`, y = NULL, alternative="g", mu=5500,paired = FALSE, conf.level=0.95)

and the result is:

One Sample t-test

data:  tabla2$`Precio max`
t = -75.692, df = 384, p-value = 1
alternative hypothesis: true mean is greater than 5500
95 percent confidence interval:
 3471.847      Inf
sample estimates:
mean of x 
 3515.086

I am not sure if I am doing this right or my understanding of the Hypothesis test is wrong. As far as I know, the p-value is greater than the significance level (0.05) therefore I should accept the Null Hypothesis, but the Null hypothesis states that the mean is equal to 5500 which cant be since the list never reaches that value. Can someone help me understand this?

Nakx
  • 1,460
  • 1
  • 23
  • 32
  • If your numbers range from 2000 to 5200 there is no point in testing whether the mean is great than 5500. It obviously isn't since your highest value is lower than 5500. Please reformulate this question. – Nakx Nov 11 '18 at 21:27
  • @Nakx thats my question, it's an assignment in my statistics class, the test should return with the Null Hypothesis being wrong, but it doesn't, why? – David Contreras Nov 11 '18 at 21:31
  • 1
    The null is not rejected and it shouldn't. I don't understand why do you expect to see a test with alternative *true mean is greater than 5500* reject the null given the range of your data. – Rui Barradas Nov 11 '18 at 22:06
  • @RuiBarradas if P > alpha, the the Null is accepted isn't it? this is the case and it shouldn't I understand that part – David Contreras Nov 11 '18 at 22:13
  • 1
    1) *the Null is accepted* No, never. What you can say is that the Null is not rejected. 2) You are testing H0: mu = 5500 versus H1: mu > 5500. Now, mu is not > 5500. – Rui Barradas Nov 11 '18 at 22:38
  • @RuiBarradas In that case how can I make a test whether the mean of tabla2$`Precio max` is greater than 5500? – David Contreras Nov 11 '18 at 22:49
  • 1
    from what i've read so far, this question is about statistics (homeworks to be precise). Not programming. – LoneWanderer Nov 12 '18 at 00:56
  • by the way, you could just compute a mean and do `if computed_mean > 5500`:) That is a test. – LoneWanderer Nov 12 '18 at 00:57
  • @LoneWanderer I had doubts at the start if I was using correctly the function and understanding its output. Besides, the test you suggested wouldn't solve it since I know from the start the correct answer, needed an Hypothesis test to prove it not a simple comparison. – David Contreras Nov 13 '18 at 02:59
  • You never said in the first place that you had to do a statistical hypothesis test. Hence my proposal. I realised later that it was indicated in question tags. – LoneWanderer Nov 18 '18 at 10:58

1 Answers1

0

I understood my problem, I was taught that the Null Hypothesis in this scenario was that mu = 5500, which made no sense for the results. Reality is that my Null Hypothesis was H0: mu <= 5500 and alternative Hypothesis H1: mu > 5500. Since p-value is greater than alpha = 0.05, this means that there isn't enough proof that H0 is false, I can't conclude anything else besides this which holds true in this scenario.