- What is hypothesis testing?
- Steps in hypothesis testing
- Importance in statistics
October 19, 2024
x <- rnorm(1000, mean = 0, sd = 1)
ggplot(data.frame(x), aes(x)) +
geom_histogram(aes(y = ..density..), bins = 30, fill = "skyblue", color = "black") +
stat_function(fun = dnorm, args = list(mean = 0, sd = 1), color = "red") +
ggtitle("Normal Distribution with Overlayed Density Curve") +
theme_minimal()
data <- data.frame(x = rnorm(100), y = rnorm(100))
p <- ggplot(data, aes(x=x, y=y)) +
geom_point() +
ggtitle("Interactive Scatter Plot")
ggplotly(p)
\[ H_0: \mu_1 = \mu_2 \quad \text{(Null Hypothesis)} \]
\[ H_1: \mu_1 \neq \mu_2 \quad \text{(Alternative Hypothesis)} \]
data1 <- rnorm(30, mean=5, sd=2) data2 <- rnorm(30, mean=6, sd=2) t.test(data1, data2)
## ## Welch Two Sample t-test ## ## data: data1 and data2 ## t = -1.0611, df = 54.682, p-value = 0.2933 ## alternative hypothesis: true difference in means is not equal to 0 ## 95 percent confidence interval: ## -1.610265 0.495469 ## sample estimates: ## mean of x mean of y ## 5.681118 6.238516