Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
MATH1005 STATISTICS [email protected] http://mahritaharahap.wordpress.com/teaching-areas Tutorial 10: Test for Means 1 In statistics we usually want to statistically analyse a population but collecting data for the whole population is usually impractical, expensive and unavailable. That is why we collect samples from the population (sampling) and make inferences about the population parameters using the statistics of the sample (inferencing) with some level of accuracy (confidence level). Statistical inference is the process of drawing conclusions about the entire population based on information in a sample by: • constructing confidence intervals on population parameters • or by setting up a hypothesis test on a population parameter General: Hypothesis Testing We use hypothesis testing to infer conclusions about the population parameters based on 1. 2. 3. 4. 5. analysing the statistics of the sample. In statistics, a hypothesis is a statement about a population parameter. Hypothesis: The null hypothesis, denoted H0 is a statement or claim about a population parameter that is initially assumed to be true. Is always an equality. The null hypothesis must specify that the population parameter is equal to a single value. The alternative hypothesis, denoted by H1 is the competing claim. What are we trying to prove. Claim we seek evidence for. (Eg. H1: population parameter ≠ or < or > hypothesised null parameter) Assumptions: A hypothesis test is invalid if the assumptions are not satisfied. Test Statistic: a measure of compatibility between the statement in the null hypothesis and the sample data obtained. It is a random variable consisting of a function of the observed values, with a distribution depending on the unknown parameter. P-Value: is the probability of obtaining a test statistic more extreme than the observed sample value given the null hypothesis is true. Conclusion: Compare the p-value with the level of significance α. If the test statistic falls in the rejection region, p-value is small , so we reject H0 and conclude that we have enough evidence is against H0. If the test statistic falls in non-rejection region, p-value is large, so we do not reject H0 and conclude that we do not have enough evidence to support H0. Make your conclusion in context of the problem. If H1: µ < µo If H1: µ > µo If H1: µ ≠ µo P-value=P(Z<τo) P-value=P(Z>τo)=1-P(Z<τo) P-value=2*P(Z>|τo|)=2*(1-P(Z<|τo|)) Or Or Or P-value=P(tn-1<τo) P-value=P(tn-1>τo)=1-P(tn-1<τo) P-value=2*P(tn-1>|τo|)=2*(1-P(tn-1<|τo|)) On R use pnorm for Z test and pt for t-Test. Both pnorm and pt give you lower tail values. To find p-value manually, note that the Z tables give you lower tail values and the t table give you upper tail values Hypothesis: H0: µ = 1800 H1: µ > 1800 Assumption: Population variance σ2 is unknown but we know the sample variance s2 therefore we will use the t-test. Test Statistic: 𝜏0 = 1850 − 1800 110/ 50 = 3.21~𝑡𝑛−1 = 𝑡49 P-value: P(t49 > 3.21) = 1 –P(t49 < 3.21)=0.001 Conclusion: Since p-value<0.05, we reject the H0, and conclude that we have enough evidence to prove the rope strength has increased. Note that the t table is upper tail. Note that the t table is upper tail and the z table lower tail.