I want to know how should I interpret the answer I got on H-value and the P-value when I have h = 1 and p = 4.009891731500901e?

1 view (last 30 days)
Diyara Rashid
Diyara Rashid on 8 Oct 2021
Commented: Rik on 8 Oct 2021
  3 Comments
Rik
Rik on 8 Oct 2021
help ttest2
TTEST2 Two-sample t-test with pooled or unpooled variance estimate. H = TTEST2(X,Y) performs a t-test of the hypothesis that two independent samples, in the vectors X and Y, come from distributions with equal means, and returns the result of the test in H. H=0 indicates that the null hypothesis ("means are equal") cannot be rejected at the 5% significance level. H=1 indicates that the null hypothesis can be rejected at the 5% level. The data are assumed to come from normal distributions with unknown, but equal, variances. X and Y can have different lengths. This function performs an unpaired two-sample t-test. For a paired test, use the TTEST function. X and Y can also be matrices or N-D arrays. For matrices, TTEST2 performs separate t-tests along each column, and returns a vector of results. X and Y must have the same number of columns. For N-D arrays, TTEST2 works along the first non-singleton dimension. X and Y must have the same size along all the remaining dimensions. TTEST2 treats NaNs as missing values, and ignores them. [H,P] = TTEST2(...) returns the p-value, i.e., the probability of observing the given result, or one more extreme, by chance if the null hypothesis is true. Small values of P cast doubt on the validity of the null hypothesis. [H,P,CI] = TTEST2(...) returns a 100*(1-ALPHA)% confidence interval for the true difference of population means. [H,P,CI,STATS] = TTEST2(...) returns a structure with the following fields: 'tstat' -- the value of the test statistic 'df' -- the degrees of freedom of the test 'sd' -- the pooled estimate of the population standard deviation (for the equal variance case) or a vector containing the unpooled estimates of the population standard deviations (for the unequal variance case) [...] = TTEST2(X,Y,'PARAM1',val1,'PARAM2',val2,...) specifies one or more of the following name/value pairs: Parameter Value 'alpha' A value ALPHA between 0 and 1 specifying the significance level as (100*ALPHA)%. Default is 0.05 for 5% significance. 'dim' Dimension DIM to work along. For example, specifying 'dim' as 1 tests the column means. Default is the first non-singleton dimension. 'tail' A string specifying the alternative hypothesis: 'both' "means are not equal" (two-tailed test) 'right' "mean of X is greater than mean of Y" (right-tailed test) 'left' "mean of X is less than mean of Y" (left-tailed test) 'vartype' 'equal' to perform the default test assuming equal variances, or 'unequal', to perform the test assuming that the two samples come from normal distributions with unknown and unequal variances. This is known as the Behrens-Fisher problem. TTEST2 uses Satterthwaite's approximation for the effective degrees of freedom. See also TTEST, RANKSUM, VARTEST2, ANSARIBRADLEY. Documentation for ttest2 doc ttest2
So the H describes which hypothesis you should pick (H0 if H is 0, H1 if H is 0), and the second output is the p-value of this t-test.
So what part here is a Matlab question exactly?

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!