Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Probability in Engineering

Lecture # 43
Announcements
• Quiz 7 on Wednesday, January 19, 2022.

2
Confidence Interval

A confidence interval, in statistics, refers to the probability that a population parameter


will fall between a set of values for a certain proportion of times. We still cannot be
certain if the interval contains the true, unknown population parameter, but we
have high level of confidence that it would.

A confidence interval always specifies a confidence level, usually 90%, 95%, or 99%,
which is a measure of the reliability of the procedure.

3
Sampling Distribution of Sample Mean

Note: This will be true for any sample size ‘𝑛’ provided that we can take all such samples
from the population.

Q. Would it be possible to have all samples from population?

4
Central Limit Theorem (CLT) for Normal
Distribution

5
Central Limit Theorem (CLT)

Q. What should be the value of 𝑛 for CLT to hold?

6
Confidence Interval of Mean

We want to find the confidence interval of population mean 𝜇 of the form 𝑙 ≤ 𝜇 ≤ 𝑢, where the
end-points 𝑙 and 𝑢 are computed from the sample data.

The value of 𝑙 and 𝑢 would change from sample to sample so they are also random variables
denoted by 𝐿 and 𝑈. We want to determine 𝐿 and 𝑈 such that the following

𝑃 𝐿 ≤ 𝜇 ≤ 𝑈 = 1 − 𝛼, where 0 ≤ 𝛼 ≤ 1

𝑙 and 𝑢 are lower- and upper-confidence limits (bounds), respectively, and c = 1 − 𝛼 is called
the confidence coefficient and 100c = 100(1 − 𝛼) is the percentage of confidence. For
example, for 95% confidence interval 𝛼 = 0.5, c = 1 − 𝛼 = 0.95.

Q. How to proceed to compute the confidence interval?

7
Confidence Interval of Mean

Q. How to proceed to compute the confidence interval of mean (assuming either that the
population is normal with known variance or 𝒏 ≥ 𝟑𝟎 ?
𝑋−𝜇
1. Standardize the sample mean Z =
(𝜎/ 𝑛)
𝑋−𝜇
2. We want to compute the interval such that 𝑃*−𝑧𝛼/2 ≤ ≤ 𝑧𝛼/2 + = 1 − 𝛼
(𝜎/ 𝑛)
𝜎
3. Multiply throughout by 𝑎𝑛𝑑 𝑠𝑢𝑏𝑡𝑟𝑎𝑐𝑡 𝑋 from each term and multiplying throughout
𝑛
by -1. We will get
𝜎 𝜎
𝑃*𝑋 − 𝑧𝛼/2 ≤ 𝜇 ≤ 𝑋 + 𝑧𝛼/2 + = 1 − 𝛼
𝑛 𝑛

The above interval is a random interval since the limits are dependent upon the sample that
we have.

8
Confidence Interval of Mean

9
95% Confidence Interval of Mean

To compute 95% confidence interval, we put 𝛼 = 0.5, 𝑐 = 0.95. From the standard normal
table the value of 𝑧𝛼/2 = 1.96 and we have to solve for

𝜎 𝜎
𝑃 𝑋 − 1.96 ≤ 𝜇 ≤ 𝑋 + 1.96 = 0.95
𝑛 𝑛

10
Example

Example: You want to rent an unfurnished one-bedroom apartment. The mean monthly rent
for a random sample of 60 such apartments is Rs. 25,000. Assume a population standard
deviation is Rs. 3000.

Q1. Construct a 95% confidence interval.


Q2. Plot the 95% confidence interval.
Q3. What does this interval tell us about true mean of the monthly rent of such apartments?

Example: How large a sample of such one-bedroom apartments would be needed to estimate
the population mean within plus or minus Rs. 500 with 90% confidence?

11
Interpreting CI

The confidence level 95% does not tell us the probability of population mean within a
specific interval since interval changes based on the sample. Instead, it tells us what would
happen if a large number of intervals were to be constructed using the same CI formula.

Q. Should we use 90%, 95% or 99% CI?

12
Hypothesis Testing

Hypothesis testing is a form of statistical inference that uses data from a sample to draw
conclusions about a population parameter or a population probability distribution. In
hypothesis testing we decide about which of two competing claims about some
parameter is true.

A Null Hypothesis is the default belief about the parameter. It is represented by 𝐻0 and it
represents currently accepted value of parameter (𝐹𝑜𝑟 𝑒𝑥𝑎𝑚𝑝𝑙𝑒, 𝐻0 :𝜃 = 𝜃0 ).

An Alternate Hypothesis (or Research Hypothesis) is the hypothesis we want to test


for the value of the parameter so it is about the claim we want to test. It is represented by
𝐻𝑎 (For example, 𝐻𝑎 :𝜃 ≠ 𝜃0 )

The two hypotheses are mathematically opposite to each other and the result of any
hypothesis test is to either a) Reject the null hypothesis or b) Fail to reject the null
hypothesis.

A Test Statistic is something calculated from the sample data that is used to decide the
result of a hypothesis test.

13
Formulation of null & alternate hypotheses

We will generally state null hypothesis as equality claim of the form 𝐻0 :𝜃 = 𝜃0 . 𝜃0 is called
the null value of the parameter.

Example: On average 60% of the people in Pakistan vote 𝑝 = 0. 6, 𝐻0 :𝑝 = 0.6. Formulate


the alternate hypothesis for this example.

Example: Let the mean paid vacations of Pakistanis each year is 6 weeks. Formulate the
null and alternate hypothesis.

Example: A teacher believes that 20% of her students study more than 2 hours per day.
She survey 80 students and found that 11 of them study for more than two hours per day.
Formulate null and alternate hypotheses.

14
Test Procedure

A test procedure is a rule, based on sample data, for deciding whether to reject
𝐻0 .

Example: Suppose that 10% of all circuit boards manufactured by a certain


manufacturer are defective. An engineer has suggested a change in the production
process in the belief to reduce the defective rate. Let 𝑝 be the proportion of the
defective boards resulting from the changed process.

Q1. Formulate the null and alternate hypotheses.


Q2. Let a random sample of 𝑛 = 200 boards is examined. Under what
circumstances would the null hypothesis 𝐻0 be rejected?

15

You might also like