\[ H_0: \mu = \mu_0 \]
\[ H_a: \mu \neq \mu_0 \]
\[ H_0: \mu = \mu_0 \]
\[ H_a: \mu \neq \mu_0 \]
\[ t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}} \]
Where: - \(\bar{x}\) is the sample mean
- \(s\) is the sample standard deviation
- \(n\) is the sample size
- \(\mu_0\) is the hypothesized population mean
## weight ## 1 46.83109 ## 2 51.72347 ## 3 47.66921 ## 4 47.72799 ## 5 46.00377 ## 6 48.76433
## ## One Sample t-test ## ## data: weights ## t = -4.3778, df = 39, p-value = 8.712e-05 ## alternative hypothesis: true mean is not equal to 50 ## 95 percent confidence interval: ## 48.55722 49.46912 ## sample estimates: ## mean of x ## 49.01317
t.test(weights, mu = 50)
plot_ly(
data = df3,
x = ~mean,
y = ~sd,
z = ~t,
type = "scatter3d",
mode = "markers",
marker = list(size = 3)
) |>
layout(
title = "3D View of t-Statistic Behavior",
scene = list(
xaxis = list(title = "Sample Mean"),
yaxis = list(title = "Sample SD"),
zaxis = list(title = "t Statistic")
)
)