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

Stats

The document outlines hypothesis testing methods, specifically Z-test, t-test, and Chi-Square test, detailing their applications based on data type, sample size, and objectives. It provides guidelines for choosing the appropriate test, examples of each test, and assumptions that must be met for valid results. Additionally, it discusses scenarios for combining these tests to analyze datasets with mixed variable types.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views10 pages

Stats

The document outlines hypothesis testing methods, specifically Z-test, t-test, and Chi-Square test, detailing their applications based on data type, sample size, and objectives. It provides guidelines for choosing the appropriate test, examples of each test, and assumptions that must be met for valid results. Additionally, it discusses scenarios for combining these tests to analyze datasets with mixed variable types.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Statistics Assignment

Topic: Hypothesis Testing: Z-test, t-test, and Chi-


Square Test

Group members: Vaniza Kamran – BB 7862


Hamza Ahmed - BB 7191
Mahrukh Javaid - BB 8091
Sandal Saeed – BB 7836

Presented to : Sir Shafqat Hussain

HYPOTHESIS:
Hypothesis testing involves selecting the appropriate statistical test to
evaluate the null and alternative hypotheses based on the data type, sample
size, and study objectives. Here’s a breakdown of how **Z-test**, **t-test**,
and **Chi-Square test** can be used individually or in combination:

### 1. **Z-Test**

Used when:

- **Data type**: Continuous (e.g., height, weight).

- **Sample size**: Large (\( n > 30 \)).

- **Population variance**: Known.


**Common Applications**:

- **One-sample Z-test**: Compare the sample mean with the population


mean.

- **Two-sample Z-test**: Compare the means of two independent groups.

- **Proportion Z-test**: Compare proportions in categorical data.

### 2. **t-Test**

Used when:

- **Data type**: Continuous.

- **Sample size**: Small (\( n \leq 30 \)).

- **Population variance**: Unknown.

**Common Applications**:

- **One-sample t-test**: Compare the sample mean with a known value.

- **Independent two-sample t-test**: Compare means of two independent


groups.

- **Paired t-test**: Compare means of two related groups (e.g., pre-test vs.
post-test).

### 3. **Chi-Square Test**

Used when:

- **Data type**: Categorical (e.g., yes/no, male/female).

**Common Applications**:

- **Chi-square goodness-of-fit test**: Compare observed frequencies with


expected frequencies.
- **Chi-square test of independence**: Test for the association between two
categorical variables.

### Combining Z-test, t-test, and Chi-Square Test

#### Scenario 1: Mixed Data Types

**Example**: A medical study comparing blood pressure levels (continuous)


between genders (categorical).

- **t-Test**: Compare blood pressure levels between two groups (males vs.
females).

- **Chi-Square Test**: Test for gender distribution in the sample.

#### Scenario 2: Validating Continuous and Categorical Data


Relationships

**Example**: An educational study exploring whether exam scores


(continuous) differ by study methods (categorical).

- **t-Test**: Compare average scores of students in two study method


groups.

- **Chi-Square Test**: Assess association between study methods and


pass/fail rates.

#### Scenario 3: Multiple Group Comparisons

**Example**: A marketing study evaluating the effectiveness of three ad


campaigns based on sales and preferences.

- **Z-Test or t-Test**: Compare sales data across groups (depending on


sample size).

- **Chi-Square Test**: Analyze customer preference (categorical) for each ad


campaign.

### Guidelines for Choosing the Test Combination


1. **Check data types**:

- Continuous → Z-test or t-test.

- Categorical → Chi-Square Test.

2. **Sample size**:

- Large (\( n > 30 \)) → Z-test.

- Small (\( n \leq 30 \)) → t-test.

3. **Objective**:

- Comparing means → Z-test or t-test.

- Checking associations → Chi-Square Test.

By strategically combining these tests, you can comprehensively analyze


datasets with mixed variable types and research questions.

Z TEST:
A Z-test is a statistical test used to determine whether the mean of a sample
is significantly different from a known population mean.

*Assumptions of a Z-test*

1. *Normality*: The data should be normally distributed.

2. *Independence*: The observations should be independent of each other.

3. *Known Population Standard Deviation*: The population standard


deviation (σ) should be known.

*Types of Z-tests*

1. *One-Tailed Test*: Used to test if the sample mean is greater than or less
than the population mean.
2. *Two-Tailed Test*: Used to test if the sample mean is significantly different
from the population mean in either direction.

*Formula for Calculating Z-Score*

Z = (x̄ - μ) / (σ / √n)

Where:

X̄ = sample mean

Μ = known population mean

Σ = population standard deviation

N = sample size

*Example 1: One-Tailed Test*

A company claims that the average height of its employees is 175 cm. A
random sample of 36 employees has an average height of 180 cm. If the
population standard deviation is 5 cm, can we conclude that the average
height of the company’s employees is greater than 175 cm?

- Null Hypothesis (H0): μ = 175 cm

- Alternative Hypothesis (H1): μ > 175 cm

- Z-Score: 2.12

- P-Value: 0.017

- Conclusion: Reject H0, the average height of the company’s employees is


significantly greater than 175 cm.

*Example 2: Two-Tailed Test*


A researcher wants to know if the average score of students who used a new
learning method is different from the average score of students who used the
traditional method. The average score of 25 students who used the new
method is 85, while the average score of students who used the traditional
method is 80. If the population standard deviation is 10, can we conclude
that the average scores are different?

- Null Hypothesis (H0): μ = 80

- Alternative Hypothesis (H1): μ ≠ 80

- Z-Score: 1.25

- P-Value: 0.211

- Conclusion: Fail to reject H0, the average scores are not significantly
different.

*Example 3: Two-Sampled Z-Test*

A company wants to compare the average salaries of its employees in two


different cities. The average salary of 30 employees in City A is $60,000,
while the average salary of 25 employees in City B is $55,000. If the
population standard deviation is $10,000, can we conclude that the average
salaries are different?

- Null Hypothesis (H0): μ1 = μ2

- Alternative Hypothesis (H1): μ1 ≠ μ2

- Z-Score: 2.5

- P-Value: 0.012

- Conclusion: Reject H0, the average salaries are significantly different.

T TEST:
The t-test is a statistical tool used to determine if there’s a significant
difference between the means of two groups.

*Types of t-Tests*

1. *Independent Samples t-Test*: Compares means of two independent


groups.

2. *Paired Samples t-Test*: Compares means of two related groups (e.g.,


before-and-after observations).

3. *One-Sample t-Test*: Compares the mean of a single group to a known


population mean.

*Key Assumptions*

For a t-test to be valid, the following assumptions must be met:

1. *Normal Distribution*: Data should be normally distributed.

2. *Independence*: Each observation should be independent of the others.

3. *Equal Variances*: Variances of the two groups should be equal (for


independent samples t-test).

*Hypothesis Testing*

In a t-test, you’ll formulate two hypotheses:

1. *Null Hypothesis (H0)*: No significant difference between the means.

2. *Alternative Hypothesis (H1)*: Significant difference between the means.


*Interpreting Results*

The t-test calculates a test statistic (t) and a p-value:

1. *t-Statistic*: Measures the difference between sample means in terms of


standard errors.

2. *p-Value*: Represents the probability of observing a t-statistic as extreme


or more extreme.

Based on the p-value, you’ll make a decision:

1. *Reject H0*: If the p-value is below a certain significance level (e.g., 0.05),
reject the null hypothesis.

2. *Fail to Reject H0*: If the p-value is above the significance level, fail to
reject the null hypothesis.

CHI- SQUARE TEST:


The Chi-Square Test is a statistical test used to determine whether there is a
significant association between two categorical variables.

*Types of Chi-Square Tests*

1. *Goodness of Fit Test*: Tests whether observed frequencies differ


significantly from expected frequencies.

2. *Independence Test*: Tests whether two categorical variables are


independent.

3. *Homogeneity Test*: Tests whether proportions of categories are equal


across different groups.
*Assumptions*

1. *Independence*: Observations are independent.

2. *Random Sampling*: Sample is randomly selected.

3. *Expected Frequencies*: Expected frequencies are at least 5.

*Steps to Perform the Chi-Square Test*

1. *State the null and alternative hypotheses*.

2. *Prepare the contingency table*.

3. *Calculate the expected frequencies*.

4. *Calculate the Chi-Square statistic*.

5. *Determine the degrees of freedom*.

6. *Find the critical value or p-value*.

7. *Make a decision*.

*Interpretation*

1. *p-value*: If the p-value is below the significance level (e.g., 0.05), reject
the null hypothesis.

2. *Chi-Square statistic*: A large value indicates a significant association


between variables.

*Common Applications*

1. *Medical Research*: Testing associations between diseases and risk


factors.

2. *Social Sciences*: Analyzing relationships between categorical variables.


3. *Marketing*: Examining associations between customer characteristics
and behaviors.

You might also like