Cavite State University - CCAT Campus
Rosario, Cavite
Elements of Experimentation
Chapter Overview: Elements of
Experimentation
• Experimentation is a fundamental process
in both science and computing. It provides
a systematic way of testing ideas, verifying
outcomes, and drawing conclusions based
on evidence. In computer science,
experimentation allows researchers and
programmers to evaluate algorithms,
measure software performance, and
analyze system behavior under different
conditions.
Chapter Overview:
This chapter introduces the key principles
and steps involved in conducting a sound
experiment. Students will learn how to
formulate a hypothesis, identify and control
variables, collect data accurately, and
analyze results using appropriate tools and
methods. It also explains how concepts such
as independent and dependent variables,
control and experimental groups, and
randomization contribute to reliable and
unbiased findings.
Chapter Overview:
• Understanding the elements of
experimentation is essential because it
strengthens critical thinking, problem-
solving, and analytical skills,abilities that
are central to both computing and
research. Through experimentation,
computer scientists can validate new ideas,
improve system designs, and make data-
driven decisions that lead to innovation
and efficiency.
Chapter Overview:
• In summary, this chapter
emphasizes that experimentation
is more than just testing it is a
disciplined process of discovery
that connects theory to real-world
application.
Learning Objectives
In this module, you will learn:
üHow to design a simple experiment in
computing,
üPhases and components of experimental
design,
üUse of tools like Excel or Python to
analyze data.
Learning Objectives
ü Design a procedure for verifying a
computing idea or hypothesis.
üIdentify and explain the components of an
experimental design.
üApply computer tools (e.g., Excel, Python)
to organize and analyze data.
Understanding Experimentation and Hypothesis
Experimentation is a scientific process of
testing an idea to see if it works.
ex:
In Computer Science, it means testing
programs, algorithms, or systems to evaluate
performance.
A hypothesis is an educated guess or prediction
about what you think will happen in an experiment.
It’s what you believe is true and you test it to find
out if you’re right or wrong.
5 Phases of Experimental Procedure
1. Planning Phase - Decide what to test
and why
2. Designing Phase - Plan how you’ll test it
3. Conducting Phase - Run and collect data
4. Analyzing Phase - Interpret data
5. Concluding Phase - Summarize findings
5 Components of Experimental Design
1. Independent Variable
2. Dependent Variable
3. Controlled Variables
4. Control Group
5. Experimental Group
Components of Experimental Design
1. Independent Variable – The variable that
the researcher manipulates or changes to
see how it affects another variable.
It is also called the predictor or explanatory
variable.
2. Dependent Variable – he variable that
the researcher measures or observes to see
how it changes because of the independent
variable.
It is also called the response or outcome
variable.
Components of Experimental Design
[Link] Variables – Variables that are
kept constant or controlled during the
experiment so they do not affect the results.
They help make sure that only the
independent variable influences the
dependent variable.
Components of Experimental Design
4, Control Group – The group in an
experiment that does not receive the
treatment or independent variable change.
It serves as a baseline for comparison.
5. Experimental Group – The group that
receives the treatment or independent
variable change.
Its results are compared with the control
group to see the effect.
EX: Components of Experimental
Design
• Independent Variable – what you change
(Algorithm Type)
• Dependent Variable – what you measure
(Execution Time)
• Controlled Variables – what stays the
same (Dataset, Hardware)
• Control Group – Bubble Sort
• Experimental Group – Quick Sort
Tools for Experimentation
• Python → run and time algorithms
• Excel/Google Sheets → organize and
graph data
• Jupyter/Colab → combine code, results,
and explanations
Components of Experimental Design
Phases of Experimental Procedure
Phase What Happens Example (in Computing)
You want to find out which sorting algorithm
1. Planning Decide what to test and why (Quick Sort or Bubble Sort) runs faster on large
datasets.
You decide to test both algorithms on the same
2. Designing Plan how you’ll test it dataset, 5 times each, using Python’s time
library to measure execution time.
You run Quick Sort and Bubble Sort on identical
3. Conducting Run the experiment and collect data data and record their execution times in Excel or
a table.
You compute the average time for each
4. Analyzing Use math/tools to interpret results algorithm and create a bar graph in Excel
showing Quick Sort is faster.
You conclude that Quick Sort performs faster
5. Concluding Summarize what you discovered than Bubble Sort for large datasets, supporting
your hypothesis.
Example Scenario:
You ran both algorithms 5 times on the
same dataset and recorded their execution
times (in seconds):
Hypothesis:
“Quick Sort will perform faster than Bubble
Sort when sorting large datasets.”
✅ Step 1:
Compute averages, differences, or trends
Bubble Sort Average:
(5.2 + 5.4 + 5.1 + 5.3 + 5.5) ÷ 5 = 5.3
seconds
Quick Sort Average:
(1.8 + 2.0 + 1.9 + 2.1 + 1.7) ÷ 5 = 1.9
seconds
Observation: Quick Sort consistently runs
faster than Bubble Sort.
✅ Step 2: Create graphs or charts
You can make a bar graph showing average
time per algorithm:
(In Excel: Insert → Chart → Column Chart)
This visual clearly shows that Quick Sort has much shorter bars (less
time).
✅ Step 3: Interpret the data
Now, interpret what your results mean.
Interpretation:
“Quick Sort runs significantly faster than
Bubble Sort based on the average execution
time.”
Does it support the hypothesis?
Yes ✅, it supports the hypothesis that Quick
Sort is faster than Bubble Sort for large
datasets.
Concluding Phase
After analyzing your data, the final step is to
draw conclusions.
This is where you summarize what you
discovered and check whether your results
agree with your hypothesis.
Concluding Phase
Step 1: Summarize Your Findings
Look at your data and describe what actually happened in
your experiment. Write in clear and simple terms what your
results show.
Example Summary:
“Based on the recorded execution times, Quick Sort
completed the sorting task much faster than Bubble Sort.
On average, Quick Sort ran in 1.9 seconds, while Bubble
Sort took 5.3 seconds.”
What this means:
Your experiment shows that the algorithm you expected to
perform better (Quick Sort) actually did.
Concluding Phase
Step 2: Compare Results to Your Hypothesis
Now, check if your findings support your original hypothesis.
Example:
Hypothesis: “Quick Sort will be faster than Bubble Sort for
large datasets.”
Result: Quick Sort was indeed faster.
Conclusion: The hypothesis is supported by the data.
If the results didn’t match your hypothesis, that’s okay!
In science and computing, a rejected hypothesis still
teaches you something valuable - maybe your data, setup,
or assumptions need adjusting.
Concluding Phase
Step 3: Identify Limitations or Possible Errors
No experiment is perfect.
Think about what could have affected your results and how
you could improve next time.
Example:
The dataset used was small — results might differ with
larger data.
Hardware performance may affect execution times.
Only two algorithms were tested; more could be compared
in the future.
Tip: Always note these limitations so others can
understand your findings accurately.
Concluding Phase
Step 4: Suggest Improvements or Next Steps
End your experiment by proposing how you could make it
better or continue it.
Example Suggestions:
Test the same algorithms with larger datasets.
Try running them on different hardware.
Add Merge Sort or Heap Sort to compare more algorithms.
Use Python’s built-in profiling tools for more accurate timing.
Concluding Phase
Final Conclusion Example:
“In conclusion, the experiment showed that Quick Sort
performed more efficiently than Bubble Sort when sorting
large datasets.
The hypothesis was supported by data showing that Quick
Sort had an average execution time of 1.9 seconds
compared to Bubble Sort’s 5.3 seconds.
Future tests using larger datasets and additional algorithms
can provide further confirmation of these findings.”
Summary
• Experimentation helps computer scientists verify
performance and [Link] involves planning,
designing, conducting, analyzing, and
concluding phases.
• Computer tools make data collection and
analysis faster and more accurate.
• Randomization means randomly assigning data,
participants, or test conditions in an
[Link] helps make sure that results are
fair and unbiased - meaning no group or
condition has an unfair advantage.
Summary
Phase Think of it as… Simple Idea
Planning Asking the question “What do I want to test?”
Designing Making a plan “How will I test it?”
Conducting Doing the work “Let’s run the test.”
Analyzing Looking at results “What do the numbers show?”
Concluding Explaining findings “What did I learn from this?”