A vending machine pours an average of 8.0 oz of coffee with a standard deviation of 0.2 oz if it is functioning properly. An inspector wants to take 16 cups of coffee from the machine to see if the machine is functioning well or not. He wants to have a significance level of 4%. What is the power of test if the true average is equal to 7.8?

,bkljfghjkl;lkjhgfghj

To calculate the power of a test, we need to know the value of the significance level (α), the sample size (n), the standard deviation (σ), the true population mean (µ), and the alternative hypothesis.

Given information:
- Significance level (α) = 0.04 (or 4%)
- Sample size (n) = 16 cups
- Standard deviation (σ) = 0.2 oz
- True population mean (µ) = 7.8 oz

Since the alternative hypothesis is not provided, we will assume it to be a two-tailed test. In a two-tailed test, the null hypothesis states that the true population mean is equal to a certain value, and the alternative hypothesis states that the true population mean is not equal to that value.

Now, let's calculate the power of the test:

Step 1: Calculate the critical z-score
First, we need to calculate the critical z-score for the given significance level (α). Since it is a two-tailed test, we will divide the significance level by 2 and find the corresponding value in the standard normal distribution (z-table).

For a significance level of 0.04, α/2 = 0.04/2 = 0.02
Using a standard normal distribution table, the critical z-score for a two-tailed test with a significance level of 0.02 is approximately 2.05 (rounded to two decimal places).

Step 2: Calculate the standard error (SE)
The standard error (SE) measures the standard deviation of the sampling distribution. It is calculated by dividing the standard deviation (σ) by the square root of the sample size (n).

SE = σ / √n
= 0.2 / √16
= 0.2 / 4
= 0.05 oz

Step 3: Calculate the test statistic (z-test)
The test statistic (z-test) measures the number of standard errors the sample mean is away from the hypothesized population mean.

z-test = (sample mean - hypothesized mean) / SE
= (8.0 - 7.8) / 0.05
= 0.2 / 0.05
= 4

Step 4: Calculate the power of the test
The power of a test is the probability of rejecting the null hypothesis when the alternative hypothesis is true. It can be calculated using the test statistic, critical z-score, and the standard normal distribution.

Power = 1 - P(type II error)
= 1 - P(z < z-critical value + z-test) - P(z > z-critical value - z-test)

Using a standard normal distribution table, we can find the probabilities for the two events above.

P(z < 2.05 + 4) = P(z < 6.05) = 1
P(z > 2.05 - 4) = P(z > -1.95) = 0.9726 (approximately)

Power = 1 - P(z < 6.05) - P(z > -1.95)
= 1 - 1 - 0.9726
= 0.0274 (approximately)

Therefore, the power of the test is approximately 0.0274 or 2.74%.