Different P-Values from F test and anova I would like to compare two Groups.
My null hypothese $H_0$:  two groups are same 
alternative hypothese $H_a$: these two groups are different
I use anova and F-Test in R. but the result of P-Value of anova and F-Test are totaly different. one of them accept the $H_0$ and the another one reject it.
here is my code:
#Anova test
Group1<-c(2,3,7,2,6)
Group2<-c(10,8,7,5,10)
combined_Groups <- data.frame(cbind(Group1,Group2))
staked_Group<-stack(combined_Groups)
Anova_Result<-aov(values ~ ind,data=staked_Group)
summary(Anova_Result)
# Result of anova
#             Df Sum Sq Mean Sq F value Pr(>F)  
# ind          1     40      40       8 0.0222 *
# Residuals    8     40       5                 
# ---
# Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

#F-Test
var.test(Group1,Group2)
#Result of F-test

#   F test to compare two variances

# data:  Group1 and Group2
# F = 1.2222, num df = 4, denom df = 4, p-value = 0.8505
# alternative hypothesis: true ratio of variances is not equal to 1
# 95 percent confidence interval:
#  0.1272548 11.7388699
# sample estimates:
# ratio of variances 
#          1.222222 

could some one explin me why P-values totaly different and which one is correct one in my case?
 A: Those are not valid hypothesis:

My null hypothese $H_0$: two groups are same
alternative hypothese $H_a$: these two groups are different

"The same" in what sense? Exactly the same in every aspect? 
all(Group1 == Group2)
## [1] FALSE

...they are not exactly the same. You should state your hypothesis more precisely.
You conducted two hypothesis tests: $F$-test of equality of variances and  $F$-test for ANOVA; in the first case you tested if both groups have the same variances, in the second case you tested if they have the same means. There are four possible combinations of those two features:


*

*same means, same variances,

*same means, different variances,

*different means, same variances,

*different means, different variances,


and there is no reason to believe why same means should correspond to same variances (unless you are talking about distributions like Poisson, but this is a different story).
As a sidenote: why are you using ANOVA rather then a $t$-test while you are comparing two groups? 
