0% found this document useful (0 votes)
13 views54 pages

Review v5

The document is a lecture outline on Probability and Statistics by Dr. Duong Thi Viet An, covering topics such as probability, random variables, discrete and continuous random variables, and various statistical procedures. It includes definitions, properties, and formulas related to probability and different types of distributions, such as binomial, geometric, and Poisson distributions. The document serves as a comprehensive guide for understanding fundamental concepts in probability and statistics.

Uploaded by

dachuy735
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views54 pages

Review v5

The document is a lecture outline on Probability and Statistics by Dr. Duong Thi Viet An, covering topics such as probability, random variables, discrete and continuous random variables, and various statistical procedures. It includes definitions, properties, and formulas related to probability and different types of distributions, such as binomial, geometric, and Poisson distributions. The document serves as a comprehensive guide for understanding fundamental concepts in probability and statistics.

Uploaded by

dachuy735
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

PROBABILITY & STATISTICS

Lecturer: Dr. Duong Thi Viet An

Hanoi, 2024

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 1 / 54


Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 2 / 54


Probability

Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 3 / 54


Probability

SAMPLE SPACES AND EVENTS

An experiment that can result in different outcomes, even though


it is repeated in the same manner every time, is called a random
experiment.
The set of all possible outcomes of a random experiment is called
the sample space of the experiment. The sample space is denoted
as S.
An event is a subset of the sample space of a random experiment.

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 4 / 54


Probability

PROBABILITY

For a discrete sample space, the probability of an event E,


denoted as P (E), equals the sum of the probabilities of the
outcomes in E.
The probability of an event E satisfies the following properties:
P (∅) = 0, P (S) = 1
0 ≤ P (E) ≤ 1
P (E 0 ) = 1 − P (E), where E 0 is the complement of E.

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 5 / 54


Probability

PROBABILITY

Probability of a union (addition rules):

P (A ∪ B) = P (A) + P (B) − P (A ∩ B)

If A ∩ B = ∅ then P (A ∪ B) = P (A) + P (B)


The conditional probability of an event B given an event A:

P (A ∩ B)
P (A|B) = .
P (B)

Multiplication rule: P (A ∩ B) = P (B)P (A|B) = P (A)P (B|A).


If A, B are independent then P (A|B) = P (A), P (B|A) = P (B) and

P (A ∩ B) = P (A)P (B).

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 6 / 54


Probability

PROBABILITY
Total probability rule (two events): For any events A and B,

P (B) = P (B∩A)+P B ∩ A0 = P (B | A)P (A)+P B | A0 P A0


  

Total probability rule (multiple events): Assume E1 , E2 , . . . , Ek are k


mutually exclusive and exhaustive sets. Then
P (B) = P (B ∩ E1 ) + P (B ∩ E2 ) + · · · + P (B ∩ Ek )
= P (B | E1 ) P (E1 ) + P (B | E2 ) P (E2 ) + · · · + P (B | Ek ) P (Ek )

Bayes theorem: If E1 , E2 , . . . , Ek are k mutually exclusive and


exhaustive events and B is any event,

P (B | E1 ) P (E1 )
P (E1 |B) =
P (B|E1 ) P (E1 )+P (B|E2 ) P (E2 )+ ... +P (B|Ek ) P (Ek )

for P (B) > 0.


Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 7 / 54
Random Variables

Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 8 / 54


Random Variables

RANDOM VARIABLES

A random variable is a function that assigns a real number to


each outcome in the sample space of a random experiment.
A discrete random variable is a random variable with a finite
(or countably infinite) range.
A continuous random variable is a random variable with an
interval (either finite or infinite) of real numbers for its range.

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 9 / 54


Discrete Random Variables

Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 10 / 54


Discrete Random Variables

Discrete random variables

Probability mass function


For a discrete random variable X with possible values x1 , x2 , . . . , xn , a
probability mass function is a function such that
f (xi ) ≥ 0
Pn
f (xi ) = 1
i=1
f (xi ) = P (X = xi ).

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 11 / 54


Discrete Random Variables

Discrete random variables

Cumulative Distribution Function


The cumulative distribution function of a discrete random variable X,
denoted as F (x), is
X
F (x) = P (X ≤ x) = f (xi )
xi ≤x

For a discrete random variable X, F (x) satisfies the following properties.


P
F (x) = P (X ≤ x) = f (xi )
xi ≤x
0 ≤ F (x) ≤ 1
If x ≤ y, then F (x) ≤ F (y).

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 12 / 54


Discrete Random Variables

Discrete Random Variables

Mean and Variance


The mean or expected value of the discrete random variable X,
denoted as µ or E(X), is
X
µ = E(X) = xf (x)
x

The variance of X, denoted as σ 2 or V (X), is


X X
σ 2 = V (X) = E(X − µ)2 = (x − µ)2 f (x) = x2 f (x) − µ2
x x

The standard deviation of X is σ = σ2.

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 13 / 54


Discrete Random Variables

Discrete uniform distribution

Discrete uniform distribution


A random variable X has a discrete uniform distribution if each of the
n values in its range, say, x1 , x2 , . . . , xn , has equal probability. Then,

f (xi ) = 1/n.

Suppose X is a discrete uniform random variable on the consecutive


integers a, a + 1, a + 2, . . . , b, for a ≤ b. The mean of X is
b+a
µ = E(X) = .
2
The variance of X is
(b − a + 1)2 − 1
σ2 = .
12

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 14 / 54


Discrete Random Variables

Binomial Distribution
Binomial Distribution
A random experiment consists of n Bernoulli trials such that:
The trials are independent.
Each trial results in only two possible outcomes, labeled as ”success”
and ”failure.”
The probability of a success in each trial, denoted as p, remains
constant.
The random variable X that equals the number of trials that result in a
success has a binomial random variable with parameters 0 < p < 1 and
n = 1, 2, . . . The probability mass function of X is

f (x) = Cxn px (1 − p)n−x x = 0, 1, . . . , n

and
µ = E(X) = np and σ 2 = V (X) = np(1 − p).
Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 15 / 54
Discrete Random Variables

Geometric Distribution

Geometric Distribution
In a series of Bernoulli trials (independent trials with constant probability p
of a success), let the random variable X denote the number of trials until
the first success. Then X is a geometric random variable with parameter
0 < p < 1 and
f (x) = (1 − p)x−1 p x = 1, 2, . . .
and
µ = E(X) = 1/p and σ 2 = V (X) = (1 − p)/p2 .

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 16 / 54


Discrete Random Variables

Negative Binomial Distribution

Negative Binomial Distribution


In a series of Bernoulli trials (independent trials with constant probability p
of a success), let the random variable X denote the number of trials until
r successes occur. Then X is a negative binomial random variable with
parameters 0 < p < 1 and r = 1, 2, 3, . . . , and
x−1
f (x) = Cr−1 (1 − p)x−r pr x = r, r + 1, r + 2, . . .

and
µ = E(X) = r/p and σ 2 = V (X) = r(1 − p)/p2 .

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 17 / 54


Discrete Random Variables

Hypergeometric Distribution

Hypergeometric Distribution
A set of N objects contains: K objects classified as successes, N − K objects
classified as failures, A sample of size n objects is selected randomly (without
replacement) from the N objects, where K ≤ N and n ≤ N .
Let the random variable X denote the number of successes in the sample. Then
X is a hypergeometric random variable and
x n−x
CK .CN −K
f (x) = n , x = max{0, n + K − N } to min{K, n}
CN
 
−n
and µ = E(X) = np and σ 2 = V (X) = np(1 − p) N N −1 ,
N −n
where p = K/N and is called the finite population correction factor .
N −1

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 18 / 54


Discrete Random Variables

Poisson Distribution

Poisson Distribution
The random variable X that equals the number of events in a Poisson
process is a Poisson random variable with parameter 0 < λ, and the
probability mass function of X is

e−λ λx
f (x) = x = 0, 1, 2, . . .
x!
and
µ = E(X) = λ, σ 2 = V (X) = λ.

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 19 / 54


Continuous Random Variable

Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 20 / 54


Continuous Random Variable

Probability Density Function

Probability Density Function


For a continuous random variable X, a probability density function is a
function such that
f (x) ≥ 0
Z∞
f (x)dx = 1
−∞
Z b
P (a ≤ X ≤ b) = f (x)dx = area under f (x) from a to b for any a
a
and b
If X is a continuous random variable, for any x1 and x2 ,

P (x1 ≤ X ≤ x2 ) = P (x1 < X ≤ x2 ) = P (x1 ≤ X < x2 ) = P (x1 < X < x2 )

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 21 / 54


Continuous Random Variable

Cumulative Distribution Function

Cumulative Distribution Function


The cumulative distribution function of a continuous random variable X is
Zx
F (x) = P (X ≤ x) = f (u)du
−∞

for −∞ < x < ∞.

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 22 / 54


Continuous Random Variable

Mean and Variance

Mean and Variance


Suppose X is a continuous random variable with probability density
function f (x). The mean or expected value of X, denoted as µ or E(X),
is
Z∞
µ = E(X) = xf (x)dx
−∞

The variance of X, denoted as V (X) or σ 2 , is


Z∞ Z∞
2 2
σ = V (X) = (x − µ) f (x)dx = x2 f (x)dx − µ2
−∞ −∞

The standard deviation of X is σ = σ2.

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 23 / 54


Continuous Random Variable

Continuous Uniform Random Variable

Continuous uniform random variable


A continuous random variable X with probability density function

f (x) = 1/(b − a), a≤x≤b

is a continuous uniform random variable and


(a + b) (b − a)2
µ = E(X) = and σ 2 = V (X) = .
2 12

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 24 / 54


Continuous Random Variable

Normal random variable

Normal random variable


A random variable X with probability density function

1 −(x−µ)2
f (x) = √ e 2σ2 −∞<x<∞
2πσ
is a normal random variable with parameters µ, where −∞ < µ < ∞, and
σ > 0. Also,
E(X) = µ and V (X) = σ 2
and the notation N µ, σ 2 is used to denote the distribution.


Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 25 / 54


Continuous Random Variable

Standard normal random variable

Standard normal random variable


A normal random variable with

µ=0 and σ2 = 1

is called a standard normal random variable and is denoted as Z. The


cumulative distribution function of a standard normal random variable is
denoted as
Φ(z) = P (Z ≤ z).
If X is a normal random variable with E(X) = µ and V (X) = σ 2 , the
random variable
X −µ
Z=
σ
is a normal random variable with E(Z) = 0 and V (Z) = 1. That is, Z is a
standard normal random variable.
Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 26 / 54
Continuous Random Variable

Normal Approximation to the Binomial Distribution


Normal Approximation to the Binomial Distribution
If X is a binomial random variable with parameters n and p,
X − np
Z=p
np(1 − p)

is approximately a standard normal random variable. To approximate a binomial


probability with a normal distribution, a continuity correction is applied as follows:
!
x + 0.5 − np
P (X ≤ x) = P (X ≤ x + 0.5) ∼ =P Z≤ p
np(1 − p)

and !
x − 0.5 − np
P (x ≤ X) = P (x − 0.5 ≤ X) ∼
=P p ≤Z
np(1 − p)
The approximation is good for np > 5 and n(1 − p) > 5.

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 27 / 54


Continuous Random Variable

Exponential Distribution

Exponential Distribution
The random variable X that equals the distance between successive events
of a Poisson process with mean number of events λ > 0 per unit interval is
an exponential random variable with parameter λ. The probability density
function of X is

f (x) = λe−λx , F (x) = P (X ≤ x) = 1 − e−λx , for 0 ≤ x < ∞,

and
1 1
µ = E(X) = and σ 2 = V (X) = .
λ λ2

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 28 / 54


Summary of One-Sample Confidence Interval Procedures

Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 29 / 54


Summary of One-Sample Confidence Interval Procedures

Summary of One-Sample Confidence Interval


Procedures

Problem Type Two-sided 100(1-α)% Confidence Interval

Mean µ,
variance σ 2 known x̄ − zα/2 √σn ≤ µ ≤ x̄ + zα/2 √σn

Mean µ,
variance σ 2 unknown x̄ − tα/2,n−1 √sn ≤ µ ≤ x̄ + tα/2,n−1 √sn
p p
Proportion p p̂ − zα/2 p̂(1 − p̂)/n ≤ p ≤ p̂ + zα/2 p̂(1 − p̂)/n

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 30 / 54


Summary of One-Sample Confidence Interval Procedures

Choice of Sample Size

Sample Size for Specified Error on the Mean, Variance Known


If x̄ is used as an estimate of µ, we can be 100(1 − α)% confident that
the error | x̄ − µ | will not exceed a specified amount E when the sample
size is
zα/2 σ 2
 
n=
E

E = zα/2 σ/ n is the length of the resulting confidence interval.

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 31 / 54


Summary of One-Sample Confidence Interval Procedures

Large-Sample Confidence Interval for a Population


Proportion

Sample Size for a Specified Error on a Binomial Proportion


z 2
α/2
n= p(1 − p)
E
Else, since max p(1 − p) = 0.25, we use
z 2
α/2
n= × 0.25
E

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 32 / 54


Summary of Tests on the Mean

Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 33 / 54


Summary of Tests on the Mean

Summary of Tests on the Mean, Variance Known

Null hypothesis : H0 : µ = µ0
x̄ − µ0
Test statistic value: z0 = √
σ/ n
Alternative P -value Critical values Reject H0
Hypothesis

H1 : µ 6= µ0 2[1 − Φ(|z0 |)] zα/2 , −zα/2 z0 > zα/2 or z0 < −zα/2

H1 : µ > µ0 1 − Φ(z0 ) zα z0 > zα

H1 : µ < µ0 Φ(z0 ) −zα z0 < −zα

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 34 / 54


Summary of Tests on the Mean

Summary of Tests on the Mean, Variance Unknown

Null hypothesis: H0 : µ = µ0
Test statistic:
X̄ − µ0
T0 = √
S/ n
has t-distribution with n − 1 degrees of freedom.
Alternative P -value Critical values Reject H0
hypothesis

H1 : µ 6= µ0 2P (Tn−1 > |t0 |) tα/2,n−1 , −tα/2,n−1 t0 > tα/2,n−1 or


t0 < −tα/2,n−1

H1 : µ > µ0 P (Tn−1 > t0 ) tα,n−1 t0 > tα,n−1

H1 : µ < µ0 P (Tn−1 < −t0 ) −tα,n−1 t0 < −tα,n−1

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 35 / 54


Summary of Tests on a Population Proportion

Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 36 / 54


Summary of Tests on a Population Proportion

Tests on a Population Proportion

Consider the two-sided hypotheses H0 : p = p0


The test statistic is
p̂ − p0
Z0 = r
p0 (1 − p0 )
n
Alternative P -value Critical values Reject H0
Hypothesis

H1 : p 6= p0 2[1 − Φ(|z0 |)] zα/2 , −zα/2 z0 > zα/2 or z0 < −zα/2

H1 : p > p0 1 − Φ(z0 ) zα z0 > zα

H1 : p < p0 Φ(z0 ) −zα z0 < −zα

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 37 / 54


Summary of Two-Sample Confidence Interval Procedures

Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 38 / 54


Summary of Two-Sample Confidence Interval Procedures

Summary of Two-Sample Confidence Interval


Procedures
Problem Type Two-sided 100(1-α)%
q 2 Confidence Interval
σ1 σ22
Difference in two means x̄1 − x̄2 − zα/2 n1 + n2 ≤ µ1 − µ2
µ1 and µ2 , q
σ12 σ22
variances σ12 and σ22 known ≤ x̄1 − x̄2 + zα/2 n1 + n
q2
1 1
Difference in two means x̄1 − x̄2 − tα/2,n1 +n2 −2 sp n1 + n2
of two normal distributions
≤ µ1 − µ2
µ1 and µ2 , q
1 1
variances σ12 = σ22 and unknown ≤ x̄1 − x̄2 + tα/2,n1 +n2 −2 sp n1 + n2

s
(n1 − 1)s21 + (n2 − 1)s22
where sp =
n1 + n2 − 2

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 39 / 54


Summary of Two-Sample Confidence Interval Procedures

Summary of Two-Sample Confidence Interval


Procedures

Problem Type Two-sided 100(1-α)%q 2 Confidence Interval


s1 s22
Difference in two means x̄1 − x̄2 − tα/2,v n1 + n2
of two normal distributions
≤ µ1 − µ2
µ1 and µ2 q
s21 s22
variances σ12 6= σ22 and unknown ≤ x̄1 − x̄2 + tα/2,v n1 + n2

2
s21 s22

n1 + n2
where v = (s21 /n1 )2 (s22 /n2 )2
n1 −1 + n2 −1

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 40 / 54


Summary of Two-Sample Confidence Interval Procedures

Summary of Two-Sample Confidence Interval


Procedures

Problem Type Two-sided 100(1-α)%


q Confidence Interval
p̂1 (1−p̂1 )
Difference in two proportions of two p̂1 − p̂2 − zα/2 n1 + p̂2 (1−
n2
p̂2 )

≤ p1 − p2
binominal parameters p1 − p2 q
p̂1 (1−p̂1 ) p̂2 (1−p̂2 )
≤ p̂1 − p̂2 + zα/2 n1 + n2

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 41 / 54


Summary of Two-Sample Hypothesis-Testing Procedures

Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 42 / 54


Summary of Two-Sample Hypothesis-Testing Procedures

Summary of Tests on the Difference in Means,


Variances Known

Null hypothesis : H0 : µ1 − µ2 = ∆0 , σ12 and σ22 known


X̄1 − X̄2 − ∆0
Test statistic: Z0 = q 2
σ1 σ22
n1 + n2

Alternative P -value Critical values Reject H0


Hypothesis

H1 : µ1 −µ2 6= ∆0 2[1−Φ(|z0 |)] zα/2 ,−zα/2 z0 > zα/2 or z0 < −zα/2

H1 : µ1 −µ2 > ∆0 1−Φ(z0 ) zα z0 > zα

H1 : µ1 −µ2 < ∆0 Φ(z0 ) −zα z0 < −zα

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 43 / 54


Summary of Two-Sample Hypothesis-Testing Procedures

Summary of Tests on the Difference in Means,


Variances unknown and Equal

H0 : µ1 − µ2 = ∆0 , σ12 = σ22 unknown.


s Test statistic:
X̄1 − X̄2 − ∆0 (n1 − 1)s21 + (n2 − 1)s22
T0 = q , where sp =
Sp n11 + n12 n1 + n2 − 2

Alternative Critical values Reject H0


Hypothesis

H1 : µ1 − µ2 6= ∆0 tα/2,n1 +n2 −2 , −tα/2,n1 +n2 −2 t0 > tα/2,n1 +n2 −2


or
t0 < −tα/2,n1 +n2 −2
H1 : µ1 − µ2 > ∆0 tα,n1 +n2 −2 t0 > tα,n1 +n2 −2
H1 : µ1 − µ2 < ∆0 −tα,n1 +n2 −2 t0 < −tα,n1 +n2 −2

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 44 / 54


Summary of Two-Sample Hypothesis-Testing Procedures

Summary of Tests on the Difference in Means,


Variances unknown and Equal

Null hypothesis : H0 : µ1 − µ2 = ∆0 ; σ12 6= σ22 unknown


s22 2
 2 
s1
X̄1 − X̄2 − ∆0 n1 + n2
Test statistic: T0 = q 2 ; v = (s2 /n )2 (s2 /n )2 .
s1 s22 1 2
n1 −1 + n2 −1
1 2
n1 + n2

Alternative Critical values Reject H0


Hypothesis

H1 : µ1 − µ2 6= ∆0 tα/2,v , −tα/2,v t0 > tα/2,v


or
t0 < −tα/2,v
H1 : µ1 − µ2 > ∆0 tα,v t0 > tα,v
H1 : µ1 − µ2 < ∆0 −tα,v t0 < −tα,v

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 45 / 54


Summary of Two-Sample Hypothesis-Testing Procedures

Summary of Tests on the Difference of Two


Population Proportions
X1 X2
Null hypothesis : H0 : p1 = p2 , P̂1 = , P̂2 =
n1 n2
P̂1 − P̂2 X1 + X2
Test statistic: Z0 = s   , where P̂ = n + n
1 1 1 2
P̂ (1 − P̂ ) +
n1 n2

Alternative P -value Critical values Reject H0


Hypothesis

H1 : p1 6= p2 2[1 − Φ(|z0 |)] zα/2 , −zα/2 z0 > zα/2 or z0 < −zα/2

H1 : p1 > p2 1 − Φ(z0 ) zα z0 > zα

H1 : p1 < p2 Φ(z0 ) −zα z0 < −zα


Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 46 / 54
Test Hypothesis about the Slope and Intercept

Content

1 Probability
2 Random Variables
3 Discrete Random Variables
4 Continuous Random Variable
5 Summary of One-Sample Confidence Interval Procedures
6 Summary of Tests on the Mean
7 Summary of Tests on a Population Proportion
8 Summary of Two-Sample Confidence Interval Procedures
9 Summary of Two-Sample Hypothesis-Testing Procedures
10 Test Hypothesis about the Slope and Intercept

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 47 / 54


Test Hypothesis about the Slope and Intercept

Simple linear regression

Estimated regression equation (best-fit line) s ŷ = β̂0 + β̂1 x where

β̂0 = ȳ − β̂1 x̄, β̂1 = Sxy /Sxx

n n Pn Pn n
X X ( i=1 xi ) ( i=1 yi ) X
Sxy = (xi − x̄)(yi − ȳ) = xi yi − = xi yi − nx̄ȳ
i=1 i=1
n i=1
n n Pn 2 n
X X ( i=1 xi ) X
Sxx = (xi − x̄)2 = (n − 1)s2x = x2i − = x2i − nx̄2
i=1 i=1
n i=1
n n Pn 2 n
X X ( i=1 yi ) X
Syy = (yi − ȳ)2 = (n − 1)s2y = yi2 − = yi2 − nȳ 2
i=1 i=1
n i=1

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 48 / 54


Test Hypothesis about the Slope and Intercept

Use regression in Excel


The regression equation is::
( house price) = 98.24833 + 0.10977 (square feet)

Regression Statistics

Multiple R 0.76211

R Square 0.58082
Adjusted R
Square 0.52842
Standard
Error 41.33032

Observations 10

ANOVA Significance X
df SS MS F F

Regression 1 18934.9348 18934.9348 11.0848 0.01039

Residual 8 13665.5652 1708.1957

Total 9 32600.5000

Standard Upper
Coefficients Error t Stat P-value Lower 95% 95%

Intercept 98.24833 58.03348 1.69296 0.12892 -35.57720 232.07386

Square Feet 0.10977 0.03297 3.32938 0.01039 0.03374 0.18580

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 49 / 54


Test Hypothesis about the Slope and Intercept

Simple linear regression

Total corrected sum of squares:


n
X n
X
SST = (yi − ȳ)2 = yi2 − nȳ 2
i=1 i=1
Pn
2
Error sum of squares SSE = i=1 (yi − ŷi )
Pn
Regression sum of squares SSR = i=1 (ŷi − ȳ)2 = SST − SSE
An unbiased estimator of σ 2 is
SSE
σ̂ 2 =
n−2
We have
2
Sxy
SSE = SST − β̂1 Sxy = SST −
Sxx

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 50 / 54


Test Hypothesis about the Slope and Intercept

Correlation coefficient

The sample correlation coefficient of a data (xi , yi ), i = 1, ..., n is

Sxy Sxy
R= √ =p
Sxx SST Sxx Syy

The coefficient of determination


2
Sxy Sxy SSR SSE
R2 = = β̂1 = =1−
Sxx SST SST SST SST

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 51 / 54


Test Hypothesis about the Slope and Intercept

Test hypothesis about the slope and intercept

Test on slope
test on y-intercept
Null Hypothesis H0 : β1 = β1,0
H0 : β0 = β0,0
Alternative Hypothesis H1 : β1 6= β1,0
H1 : β0 6= β0,0
β̂1 − β1,0
β̂0 − β0,0
Test satistic T0 = T0 =
se(β̂1 )
se(β̂0 )
Reject H0 |t0 | > tα/2,n−2
|t0 | > tα/2,n−2
s
σ̂ 2
Estimated standard error of the slope is se(β̂1 ) =
sxx
Estimated standard error of the intercept is
s 
x̄2

2
1
se(β̂0 ) = σ̂ +
n sxx

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 52 / 54


Test Hypothesis about the Slope and Intercept

Test for zero correlation

Test the hypothesis

H0 : ρ = 0

Test statistic √
R n−2
T0 = √
1 − R2
has a t−distribution with n − 2 degrees of freedom if H0 is true.

Alternaive hypothesis Critical values Reject H0


H1 : ρ 6= 0 tα/2,n−2 , −tα/2,n−2 |t0 | > tα/2,n−2
H1 : ρ > 0 tα,n−2 t0 > tα,n−2
H1 : ρ < 0 −tα,n−2 t0 < −tα,n−2

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 53 / 54


Test Hypothesis about the Slope and Intercept

Good luck!

Dr. Duong Thi Viet An PROBABILITY & STATISTICS Hanoi, 2024 54 / 54

You might also like