Why Statistical Tests Validate Hypotheses
📖 Scenario: Imagine you are a scientist testing if a new medicine changes blood pressure. You collect data from patients and want to check if the medicine really works or if the changes happened by chance.
🎯 Goal: You will write a simple R program that uses a statistical test to check if the average blood pressure after medicine is different from before. This helps you understand how statistical tests validate hypotheses.
📋 What You'll Learn
Create a numeric vector called
before with exact values: 120, 122, 119, 130, 125Create a numeric vector called
after with exact values: 115, 118, 117, 128, 120Create a variable called
alpha and set it to 0.05Use
t.test() with before and after to perform a paired t-testPrint the p-value from the test result
💡 Why This Matters
🌍 Real World
Scientists and researchers use statistical tests to check if their ideas about data are true or just random chance.
💼 Career
Understanding hypothesis testing is important for data analysts, scientists, and anyone working with data to make informed decisions.
Progress0 / 4 steps