Open In App

Lower Tail Test of Population Mean with Unknown Variance in R

Last Updated : 22 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

This article will discuss the lower Two-Tailed Test of Population Mean with Unknown Variance in R Programming Language.

Conventionally, In a lower tail test is used in null-hypothesis testing. The lower tail test of the population means the null hypothesis can be expressed as follows μ ≥ μo. A statistical hypothesis test is a method of statistical inference used to decide whether the data at hand sufficiently support a particular hypothesis. The conventional steps that are followed while formulating the hypothesis test, are listed as follows

  • State null hypothesis (Ho) and alternate hypothesis (Ha)
  • Collect a relevant sample of data to test the hypothesis.
  • Choose significance level for the hypothesis test.
  • Perform an appropriate statistical test.
  • Based on test statistics and p-value decide whether to reject or fail to reject your null hypothesis.

Conventionally, In a lower-tail test, the null hypothesis states that the true population mean (μo) is greater than the hypothesized mean value (μ). We fail to reject the null hypothesis if the test statistic is greater than the critical value at the chosen significance level. 

Here the assumption is the population variance σ2  is unknown. Let s2 be the sample variance. For larger n (usually >30), the population of the following statistics of all possible samples of size n is approximately a Student t distribution with n – 1 degree of freedom (DOF).

Let us define the test statistic based on t-distribution as follows

t = \frac{\bar{X}-\mu }{s /\sqrt{n}}

if t ≤−tα, where tα is the 100(1 − α) percentile of the Student t distribution with n-1 degree of freedom, we can reject the null hypothesis.

Let us try to understand the lower tail test with unknown variance considering a case study.

Suppose the manufacturer claims that the mean lifetime of a tyre is more than 10,000 km. Assume the actual mean tyre lifetime is 9,950 km and the sample standard deviation is 120 km. At the 0.05 significance level, is it possible to reject the claim of the manufacturer (i.e) reject the null hypothesis for a sample size of 30 tyres?

Null Hypothesis: the mean lifetime of a tyre >= 10000
Alternate Hypothesis: the mean lifetime of a tyre < 10000
Significance level: 0.05

Let us compute the test statistic

R

# sample mean
xbar = 10000
  
# hypothesized value
mu0 = 9950  
  
# sample standard deviation
s = 120   
  
# sample size
n = 30  
  
t = (xbar-mu0)/(s/sqrt(n))
  
# test statistic
t

                    

Output:

2.28217732293819

Now, let us compute the critical value at a 0.05 significance level,

R

alpha = .05 
t.alpha = qt(1-alpha, df=n-1) 
  
# critical value 
-t.alpha

                    

Output:

-1.6991270265335

The test statistic 2.2821 is much greater than the critical value of -1.6991, which means according to our initial assumption, here t >−tα, so we fail to reject the null hypothesis.

Hence, at the .05 significance level, we fail to reject the statement of the company that they mean the lifetime of a tyre is greater than 10000km. Here, we don’t have enough evidence to reject the company’s claim.



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads