Probability and Statistics Tutorial 4
Probability and Statistics Tutorial 4
The sign test is a non-parametric test used to evaluate a median claim when data do not necessarily meet parametric test assumptions such as normality. It tests if the median of a sample is equal to a specified value. In practice, each data point is compared to the hypothesized median, and the data are replaced with +, -, or 0 depending on whether the point is above, below, or equal to the median. The number of positive and negative signs forms a binomial distribution. The test statistic, evident from the number of positives or negatives, helps determine if deviations from the hypothesized median are statistically significant. It is applied using a selected significance level (e.g., 5%) to either accept or reject the median claim .
Various statistical tests are used to compare means and variances depending on the data's characteristics. The Z-test is suitable for comparing means when the sample size is large or the population variance is known. The t-test is applicable for smaller samples or unknown population variance. The Chi-square test is used to compare variance with a known population variance. The F-test compares two population variances. Selection of tests depends on assumptions like normality, sample size, and whether the variances are equal (homoscedasticity). Thus, the tests help determine if there are significant differences in population parameters or variances .
In hypothesis testing, a Type I error occurs when the null hypothesis \( H_0 \) is incorrectly rejected when it is true. It is denoted by \( \alpha \), the significance level, representing the probability of making this error. Conversely, a Type II error occurs when \( H_0 \) is not rejected when it is false. It is denoted by \( \beta \), representing the failure to detect a difference when one exists. These errors imply that statistical tests can lead to incorrect conclusions, and the balance between \( \alpha \) and \( \beta \) affects the test's sensitivity and specificity. Increasing sample size can reduce both errors simultaneously, improving test power \( 1 - \beta \).
To evaluate the probability of observing a specific sample mean—in this case, an average of 290 days for battery lifespan, under the null hypothesis that the true mean is 300 days—the t-distribution is employed. Here, the test statistic \( t \) is calculated using \( t = \frac{\bar{x} - \mu}{s / \sqrt{n}} \), where \( \bar{x} \) is the sample mean, \( \mu \) is the hypothesized population mean, \( s \) is the sample standard deviation, and \( n \) is the sample size. With the calculated \( t \approx -0.7746 \), the probability (also known as the p-value) associated is found using the t-distribution table, yielding a cumulative probability of 22.6%. Therefore, there is a 22.6% chance that the sample mean would be less than 290 days if the true mean were 300 days .
Statistical tests, such as the binomial test, are essential in evaluating the effectiveness of a medical treatment by comparing the observed success rate against a hypothesized success rate. For example, if a mussel extract is claimed to relieve osteoarthritis in over 40% of patients, statistical hypotheses are set up: \( H_0 \) that \( p = 0.4 \) vs. \( H_1 \) that \( p > 0.4 \). Testing involves comparing actual success counts against expected counts under \( H_0 \), using statistical tables or software to determine if observed effectiveness (e.g., 3 out of 7 patients showing improvement) is significantly greater than chance given the sample size. The test evaluates reliability of the claim by calculating the probability of obtaining the observed or more extreme results if \( p = 0.4 \) were true, hence informing treatment efficacy .
To evaluate the robustness of a test procedure, the balance and rates of Type I (\( \alpha \)) and Type II (\( \beta \)) errors must be analyzed. Consider the test to decide whether a procedure's error rates and power (\( 1 - \beta \)) meet acceptable standards. A robust procedure efficiently controls \( \alpha \), ensuring a low probability of false positives, and \( \beta \), maintaining the ability to detect true positives. This can be performed by specifying plausible alternative hypotheses, determining the practical consequences of errors, and adjusting the sample size which influences both errors. Tools like the ROC curve may also be used to visually assess and optimize test decision thresholds .
In hypothesis testing, the p-value measures the strength of evidence against the null hypothesis \( H_0 \). It represents the probability of obtaining a test statistic at least as extreme as the one observed, given that \( H_0 \) is true. A smaller p-value indicates stronger evidence against \( H_0 \). The significance level \( \alpha \), often set at 0.05 or 0.01, is the threshold for deciding whether to reject \( H_0 \). If the p-value is less than \( \alpha \), \( H_0 \) is rejected, suggesting that the observed data provide significant evidence to support the alternative hypothesis. Thus, both the p-value and \( \alpha \) guide conclusions about hypotheses .
To determine if a manufacturing process, such as a dispensing machine set to deliver 3 kg on average per carton but has a sample mean of 3.005 kg, requires adjustment, a statistical test is performed using hypothesis testing. The null hypothesis \( H_0 \) is that the true mean \( \mu \) is 3 kg, and the alternative hypothesis \( H_1 \) is that \( \mu \) is not 3 kg. Given the known variance of 0.0152 kg² and employing the Z-test for a sample size of 40, the Z-score is calculated using \( Z = \frac{\bar{x} - \mu}{\sigma / \sqrt{n}} \), where \( \bar{x} \) is the sample mean. The calculated Z-score is then compared to the critical values for a 5% significance level. If the Z-score falls outside the range, we reject \( H_0 \), concluding the machine requires adjustment for not operating at the standard .
Increasing sample size has significant implications on hypothesis testing error rates. A larger sample size generally reduces Type I error risk by providing a more precise estimate of the population parameter, confirming or rejecting hypotheses more reliably without 'false alarms.' Similarly, it enhances the power of a test \( 1-\beta \), decreasing Type II error by making it easier to detect true differences when they exist. This improved sensitivity ensures that test outcomes are less influenced by random sampling variation, as more data provide a clearer view of actual population trends .
An unbiased estimator of a population parameter is a statistic used to estimate the parameter such that the expected value of the statistic is equal to the true parameter value. In mathematical terms, an estimator \( \hat{\theta} \) is unbiased for a parameter \( \theta \) if \( E(\hat{\theta}) = \theta \). To prove that the sample mean is an unbiased estimator of the population mean \( \mu \), we consider a random sample \( X_1, X_2, ..., X_n \) with each \( X_i \) having mean \( \mu \) and variance \( \sigma^2 \). The sample mean \( \bar{X} = \frac{1}{n} \sum_{i=1}^{n} X_i \). The expectation of the sample mean \( E(\bar{X}) \) is given by \( E(\bar{X}) = E\left( \frac{1}{n} \sum_{i=1}^{n} X_i \right) = \frac{1}{n} \sum_{i=1}^{n} E(X_i) = \mu \). Thus, the sample mean is an unbiased estimator of \( \mu \).