# One Sample T-Test and Z-Test

The one-sample t-test and z-test are statistical hypothesis tests used to compare a sample mean to a known population mean.

**One-sample t-test:**Assesses whether the mean of a sample differs significantly from a known or hypothesized population mean when the population standard deviation is unknown. It calculates a t-statistic and compares it to a t-distribution to determine significance.**Z-test:**Similar to the t-test but applicable when the population standard deviation is known or when the sample size is large. It calculates a z-score and compares it to a standard normal distribution.

Both tests help determine if observed differences are statistically significant.