SBP_RM_parent) block in the chain. Timestamp: It is a system that verifies the data into the block and assigns a time or date of creation for digital documents. The timestamp is a string COURSEWORK_31052025.pptx
parent) block in the chain.
Timestamp: It is a system that verifies the data into the block and assigns a time or date of creation for digital documents. The timestamp is a string
Similar to SBP_RM_parent) block in the chain. Timestamp: It is a system that verifies the data into the block and assigns a time or date of creation for digital documents. The timestamp is a string COURSEWORK_31052025.pptx (20)
PPTX
Metabolomic Data Analysis Workshop and Tutorials (2014)
SBP_RM_parent) block in the chain. Timestamp: It is a system that verifies the data into the block and assigns a time or date of creation for digital documents. The timestamp is a string COURSEWORK_31052025.pptx
1. Title of Seminar: Testing of Hypothesis Using Various Tests (ANOVA, Chi-Square, etc.)
Presented by:
Phalke Sagar Balkrishna
Ph.D. Scholar
Department of Technology
Shivaji University, Kolhapur
2. Introduction to Hypothesis Testing
•What is a hypothesis?
•Null vs. alternative hypothesis
•Type I & II errors
•Confidence level & p-value
•Relevance in Computer Engineering (e.g., software performance)
3. What is a Hypothesis?
What is a Hypothesis?
A hypothesis is an assumption or claim made about a population parameter (e.g., average
response time of a server).
• Example:
"The average execution time of Algorithm A is less than Algorithm B."
Hypothesis testing helps us decide whether to accept or reject such claims using sample
data.
4. Null vs. Alternative Hypothesis
Hypothesis Symbol Description
Null Hypothesis H₀
Assumes no effect, no
difference – the status quo.
Alternative Hypothesis H or Ha
₁
Represents a new claim or
effect to be tested.
Example:
•H : Execution times of Algorithm A and B are equal.
₀
•H : Execution times of Algorithm A and B are
₁
different.
5. Type I and Type II Errors
Type Description Risk
Type I Error
Rejecting H when it is
₀
actually true
False Positive
Type II Error
Failing to reject H when H is
₀ ₁
actually true
False Negative
•Example in Software Testing:
• Type I: Believing a new compiler improves performance when it doesn’t.
• Type II: Missing a real improvement in performance.
6. Confidence Level & p-value
•Confidence Level:
Probability that the test results are correct (usually 95% or 99%).
•p-value:
The probability of observing the sample result if H is true.
₀
•If p-value ≤ α (significance level, e.g., 0.05) Reject H₀
.
₀
•Smaller p-value means stronger evidence against H₀.
7. Relevance in Computer Engineering
•Hypothesis testing is applied in:
•Software Performance: Is new code faster than the old version?
•Usability Studies: Does UI version A result in fewer errors than version B?
•Network Efficiency: Is one protocol significantly more efficient than another?
•Bug Prediction: Does code complexity correlate with defect frequency?
8. Statistical Tests Overview
Parametric vs. Non-Parametric Tests
Feature Parametric Tests Non-Parametric Tests
Assumptions Require normal distribution No assumption of distribution
Data Type Interval or ratio scale Ordinal or nominal scale
Examples t-test, Z-test, ANOVA
Chi-square, Mann-Whitney,
Kruskal-Wallis
9. One-tailed vs. Two-tailed Tests
Type Purpose Example
One-tailed
Tests for difference in one
direction
Is A greater than B?
Two-tailed
Tests for any difference (either
way)
Is A different from B (more or
less)?
Choosing the Right Test
Situation Suggested Test
Comparing 2 means (normal data) t-test
Comparing >2 means ANOVA
Proportions or large sample mean Z-test
Relationship between categories Chi-square test
Comparing medians (non-normal data) Mann-Whitney / Kruskal-Wallis
10. Overview of Key Tests
• t-test: Compares means of two groups (e.g., speed of Algorithm A vs. B).
• Z-test: Similar to t-test but used for large samples or known variance.
• ANOVA: Compares means of more than two groups (e.g., comparing 3 sorting algorithms).
• Chi-square Test:
• Goodness-of-fit: Is the observed distribution as expected?
• Independence: Is there a relationship between two categorical variables?
11. Data Collection & Sampling Techniques
Types of Data
Type Description
Example (Computer
Engineering)
Nominal Categories without order
OS type: Windows, Linux,
Mac
Ordinal Ordered categories
Bug severity: Low,
Medium, High
Interval
Numeric data without
true zero
CPU temperature in °C
Ratio
Numeric data with a true
zero
CPU usage (%),
execution time (ms)
12. Data Preprocessing
Steps to clean and prepare data:
• Remove noise or incorrect entries
• Handle missing values
• Normalize/standardize values
• Convert categorical data (e.g., OS type) to numerical codes for analysis
Example: Collecting CPU Performance Data
•Objective: Compare average CPU usage under different applications.
•Steps:
• Select a random sample of systems.
• Collect data: CPU usage %, app name, duration.
• Preprocess: Remove outliers, fill missing values.
• Analyze using ANOVA or t-test.
13. What is a Z-Test?
What is a Z-Test?
A Z-test is used to test hypotheses about population means or proportions, especially when the
sample size is large (n ≥ 30) and population variance is known.
Z-Test for Means
Used to compare a sample mean with a known population mean.
Formula:
Where:
•xˉ: sample mean
•μ: population mean
•σ: population standard deviation
•n: sample size
14. Z-Test for Proportions
Z-Test for Proportions
Used to compare sample proportion (pp) to a known population proportion (PP).
Formula:
When to Use Z-Test
•Large sample size (n 30
≥ )
•Population standard deviation
is known
•Data follows a normal distribution
Computer Engineering Example
Scenario:
A lab wants to verify if its computers have a higher
average CPU clock speed than the market average of 2.4
GHz.
•H₀: Mean = 2.4 GHz
•H₁: Mean > 2.4 GHz
•Use Z-test for one-tailed hypothesis with large sample
data
15. What is a T-Test?
A t-test is used to compare means when the sample size is small (n < 30) and the
population standard deviation is unknown.
Types of T-Tests
1. One-Sample T-Test
Compares the sample mean to a known or hypothesized population mean.
Example:
Check if the average RAM in a lab differs from the industry average (e.g.,
8 GB).
Two-Sample (Independent) T-Test
Compares means from two independent groups.
Example:
Compare execution time of Algorithm A vs. Algorithm B on different systems.
Paired T-Test
Compares means from the same group before and after an event or treatment.
Example:
Test if a new compiler improves performance:
•Measure execution time before and after update on the same set of
programs.
16. When to Use Each
Test Type When to Use
One-Sample Comparing sample mean to known population mean
Two-Sample Comparing means from two unrelated groups
Paired T-Test Comparing before/after or matched-pair observations
Computer Engineering Example
Scenario:
You upgrade a compiler and want to know if it improves execution speed.
•Use a paired t-test
•Measure execution time of programs before and after the upgrade
•H : No difference in mean times
₀
•H : Mean time after upgrade is lower
₁
17. Parametric Tests – ANOVA (Analysis of Variance) – I
What is One-Way ANOVA?
One-Way ANOVA is used to compare the means of three or more independent
groups to determine if at least one group mean is significantly different.
Why Not Multiple t-Tests?
Using multiple t-tests increases the risk of Type I error. ANOVA controls this risk by
comparing all groups at once.
Assumptions of One-Way ANOVA
1.Independence of observations
2.Normal distribution of data in each group
3.Equal variances (homogeneity of variance)
How It Works – F-Statistic
ANOVA breaks total variance into:
•Between-group variance (difference between group means)
•Within-group variance (variation within each group)
F-statistic is calculated as: F=Variance Within Groups/Variance Between Groups
A higher F value suggests more significant group differences.
18. Computer Engineering Example
Computer Engineering Example
Scenario:
You want to compare RAM usage of three text editors: VS Code, Sublime, Notepad++.
• Groups: 3 different software
• Measure: RAM usage (in MB) while opening a large file
• H : All software have
₀ equal average RAM usage
• H : At least one software has
₁ different average RAM usage
Apply one-way ANOVA to determine if the difference is statistically significant.
Parametric Tests – ANOVA – II
What is Two-Way ANOVA?
Two-Way ANOVA is used to study the effect of two independent variables (factors)
on one dependent variable, and whether there's any interaction between them.
Why Use Two-Way ANOVA?
It allows you to:
•Test the individual effects of two factors
•Check for interaction effects (i.e., combined influence of the two factors)
19. Key Concepts
• Main Effect: Impact of each factor independently
• Interaction Effect: Impact of both factors together, beyond individual effects
Structure of Two-Way ANOVA Table
Source Explanation
Factor A Effect of first independent variable
Factor B Effect of second independent variable
A × B Interaction Combined effect of A and B
Error Random variation
Total Total variation
20. Computer Engineering Example
Scenario:
You want to test how operating system (Windows, Linux) and application (Chrome,
Firefox) affect CPU usage.
• Factor A: Operating System (2 levels: Windows, Linux)
• Factor B: Application (2 levels: Chrome, Firefox)
• Dependent Variable: Average CPU usage (%)