Hypothesis testing is a statistical method used to make inferences or draw conclusions about a population based on sample data.
Hypothesis testing is a statistical method used to make inferences or draw conclusions about a population based on sample data.
We define: \[ H_0: \text{Null Hypothesis (no effect)} \] \[ H_1: \text{Alternative Hypothesis (effect exists)} \] Typically, we test if a parameter (like mean) differs from a hypothesized value.
In simple linear regression, we model the relationship between a dependent variable \(Y\) and an independent variable \(X\) using the equation: \[ Y = \beta_0 + \beta_1 X + \epsilon \] where:
For a one-sample t-test: \[ t = \frac{\bar{X} - \mu_0}{\frac{s}{\sqrt{n}}} \] Where: - \(\bar{X}\) is the sample mean, - \(\mu_0\) is the hypothesized population mean, - \(s\) is the sample standard deviation, and - \(n\) is the sample size.
A p-value helps us determine the strength of the evidence against the null hypothesis:
A low p-value (≤ α) suggests the data provides sufficient evidence to reject Ho.
A high p-value (> α) indicates insufficient evidence to reject Ho.
# Example of conducting a t-test in R set.seed(123) data <- rnorm(30, mean = 5, sd = 2) t.test(data, mu = 5)
## ## One Sample t-test ## ## data: data ## t = -0.26299, df = 29, p-value = 0.7944 ## alternative hypothesis: true mean is not equal to 5 ## 95 percent confidence interval: ## 4.173147 5.638438 ## sample estimates: ## mean of x ## 4.905792
Hypothesis Testing allows us to make inferences about population parameters using sample data.
Simple Linear Regression helps in understanding and modeling the relationship between two quantitative variables.