Assignment for "THE GRADE"

profilesunsam233
0-StatisticalTests-3Methods.pdf

Basics of Hypothesis Testing

Should I hire this guy? ➢ Suppose you are the manager of a McDonalds franchise in a busy neighborhood.

➢ You want to hire somebody to prepare sandwiches.

➢ Your neighbor’s son, Chris (whom you don’t like that much) applies for the job.

➢ He claims he can serve one customer in less than 3 minutes (really good!!!!).

➢ You test him for one day and 30 customers who show up at lunchtime.

➢ His average service time per customer (He serves 10 of them) is a dismal 10 minutes.

➢ Do you believe him? Is he a liar?

Is Chris a liar? ➢ Over 10 customers, his average service time is 10 minutes. ➢ You probably won’t believe him.

➢ If he is telling the truth about serving customers in less than 3 minutes, it is very unlikely that his average service time that day is 10 minutes.

➢ Now suppose his average service time is 4 minutes for the first 10 customers. ➢ More likely to believe him.

➢ At what point between 4 and 10, do we make the decision to believe Chris or not?

When will you believe Chris? ➢ Subjective! You probably have a cut-off score in your mind.

➢ If his average service time is more than 5 minutes, don’t believe him.

➢ If his average service time is 5 minutes or less, believe him.

➢ So Chris makes a “claim” and if his sample average falls above our cutoff value (based on the assumption that the claim is true) ➢ we REJECT the claim.

Distribution of Chris’s Serving Times

probabilities

Chris’s average service time for 10 customers

𝜇 = 3 5

Rejection Region

Now let’s talk statistics! ➢ Null Hypothesis (𝐻0) is the “claim”. ➢ Chris claims that his average service time is 3 minutes.

➢ Alternate Hypothesis (𝐻1) is the counter-claim. ➢ Chris’s average service time is more than 3 minutes, and he is a liar (one-sided)

➢ Chris’s average service time is either more or less than 3 minutes, and he is a liar (two-sided)

➢ Sample Statistic (𝑋) is the observed sample estimate, used to determine whether null hypothesis must be rejected. ➢ Chris’s average service time for the 10 customers he served in your restaurant.

➢ Critical Value (c) is the cut-off value that indicates whether the claim must be rejected or not. ➢ You think: “If Chris’s average service time today is higher than 5 minutes, I won’t hire him”.

➢ Significance Level (𝛼) shows how sure you want to be when rejecting the null hypothesis. ➢ Smaller the 𝛼, the more certain you are when rejecting 𝐻0.

Hypothesis Test: Method 1 ➢ Write the null hypothesis and the alternative hypothesis.

➢ Note: Hypotheses are about the population, which we study through our sample.

➢ Calculate the related sample parameter.

➢ Determine your significance level.

➢ Based on the desired significance level, you can find the rejection region.

➢ If your sample parameter falls in the rejection region, you reject the null hypothesis.

➢ Otherwise, you don’t have enough evidence to reject the null hypothesis.

Confidence Interval ➢ Now suppose you decide to try Chris for one month. ➢ You record his average service time every day. ➢ At the end of the month, you look at the data and say: “Based on this data, I

am 95% sure that his average service time is between 5 and 7 minutes”. ➢ If Chris claims that his average service time is 4 minutes, what do you tell

him? ➢ Buddy, 4 minutes is not in the between 5 and 7 minutes.

➢ I am going to reject your claim and I am 95% sure.

➢ 5-7 minutes is called the 95% confidence interval. ➢ If the claimed value is not in the confidence interval, then you reject the

claim.

Hypothesis Test: Method 2 ➢ Write the null hypothesis and the alternative hypothesis.

➢ Find the confidence interval for the population parameter, based on the sample you get.

➢ If your hypothesized value does not fall in the confidence interval, you can reject the claim.

P-Value ➢ Again suppose you decide to try Chris for one month.

➢ You record his average service time every day.

➢ Chris claims that his average service time is 4 minutes.

➢ You show the recorded times to your statistician friend and he tells you: “Based on this data, the probability that this data comes from a distribution with mean = 4 is less than 1%.

➢ The probability that the claim is true (based on the data) is called the p- value.

➢ If p_value is less than your level of significance, you reject the claim.

Hypothesis Test: Method 3 ➢ Write the null hypothesis and the alternative hypothesis.

➢ Find the p-value: the probability that you get the sample you have, if your null hypothesis (claim) was true.

➢ If this probability is small, you can reject the claim.