0% found this document useful (0 votes)
4 views10 pages

Hypothesis Testing Methods Overview

The document provides an overview of hypothesis testing methods, including tests for one population mean, two independent populations, and two dependent populations, along with non-parametric tests and chi-squared tests. It outlines specific functions to use for each type of test, such as ttest_1samp, ttest_ind, and ttest_rel, and emphasizes the importance of testing for normality and equality of variances. Examples are given for practical application of these tests.

Uploaded by

paballopj
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views10 pages

Hypothesis Testing Methods Overview

The document provides an overview of hypothesis testing methods, including tests for one population mean, two independent populations, and two dependent populations, along with non-parametric tests and chi-squared tests. It outlines specific functions to use for each type of test, such as ttest_1samp, ttest_ind, and ttest_rel, and emphasizes the importance of testing for normality and equality of variances. Examples are given for practical application of these tests.

Uploaded by

paballopj
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SU11

Hypothesis Tests Overview

• One population (𝜇): Use ttest_1samp to test if the sample mean equals a specified
population mean.

• Two independent populations (𝜇₁ and 𝜇₂): Use ttest_ind to compare the means of two
different populations.

• Two dependent populations (𝜇ₓ): Use ttest_rel for related samples to test the
difference in means between two related populations.

• Non-parametric tests: If normality is not met, use tests like wilcoxon for non-
parametric testing.

• Chi-squared tests: Used to test for goodness-of-fit or independence between variables


in frequency data.

2. Hypothesis Testing for One Population Mean

• Function: ttest_1samp(X, popmean=0)

• Example:


• Testing for normality: Use graphical tests like QQ-plot, boxplot, or histogram, and
perform the Shapiro-Wilk test using shapiro(X).


3. Hypothesis Testing for Two Independent Populations

• Function: ttest_ind(X1, X2, equal_var=True/False)

• Testing normality: Pool the centered and scaled samples, and use the Shapiro-Wilk
test.


• Equal variance: Use levene(X1, X2) to test if the variances are equal.

• Example: Test if the population mean body temperature of women is less than men
using ttest_ind.


• EQUALITY OF VARIENCES



• TTEST

4. Hypothesis Testing for Two Dependent Populations

• Function: ttest_rel(X1, X2) or ttest_1samp(difference)

• Example: Test if the mean body temperature after sleeping is lower than before using
ttest_rel.


• METHOD 1


• METHOD 2

5. Non-Parametric Tests

• One population (𝜈): Use the Wilcoxon test for non-parametric testing if normality is not
satisfied, wilcoxon(X - K).


• EXAMPLE:


• Two independent populations: Use the rank-sum test with ranksums(X1, X2).

EXAMPLE:

• Two dependent populations: Use wilcoxon on the differenced data.


• EXAMPLE:

6. Chi-Squared Tests

• Goodness-of-fit: chisquare(O, E) compares observed frequencies to expected ones.


• EXAMPLE: Chi-squared tests in Python (one-way tables) – Tabulated data

• EXAMPLE:


• Independence tests: Use chi2_contingency(M) for testing the independence between
two categorical variables.


• EXAMPLE:

You might also like