Statstics and Probability-Merged

You might also like

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

1.

Definitions :

1.Statistical Experiment: is a planned activity whose set of the results (outcomes) is certain;
but it can’t be said before that; which outcome occurs.

1.2.Sample Space: is the set of all possible outcomes of the experiment. It is denoted by 𝑆
or Ω .

1.3.Event: is a subset of the sample space. For an 𝑛 element set;


The number of the events: 2𝑛

EXAMPLES:

1- The experiment : Flip a coin (tossing of a coin)

Sample Space :

𝛺 = {𝐻, 𝑇}

Head Tail
Events :

𝐴1 = {𝐻}, The filp is H.

𝐴2 = {𝑇}, The filp is T.

𝐴3 = {∅}

𝐴4 = {𝐻, 𝑇}, The filp is H or T

2- The experiment : Flip a coin two times.


Sample space :

𝛺 = {𝑇𝑇, 𝑇𝐻, 𝐻𝑇, 𝐻𝐻}

𝑛(𝛺) = 4 ( Number of elements)

Events:
𝐴 = {𝑇𝑇}
𝐴 = {𝑇𝐻}
𝐴 = {𝐻𝑇}
𝐴 = {𝐻𝐻}

𝐴 = {𝑇𝑇, 𝑇𝐻}
.
. Number of Events: 24 = 16
.

𝐴= 𝛺

𝐴: The first flip is head.


𝐴 = {𝐻𝑇, 𝐻𝐻}

𝐵: The second flip is tail.


𝐵 = {𝑇𝑇, 𝐻𝑇}

𝐶: The first flip is tail, the second is head.


𝐶 = {𝑇𝐻}

𝐷: In two times, at least one time tail.


𝐷 = {𝑇𝑇, 𝑇𝐻, 𝐻𝑇}
3-Flip a coin three times.

Sample space :

𝛺 = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇, 𝑇𝐻𝐻, 𝑇𝐻𝑇, 𝑇𝑇𝐻, 𝑇𝑇𝑇}

𝑛(𝛺) = 8 ( Number of elements)

Number of Events: 28 = 64

Event A: 1st flip is heads.

𝐴 = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇}

4-Flip the two coins at the same time.

Sample space :

𝛺 = {𝑇𝑇, 𝑇𝐻, 𝐻𝐻}

𝑛(𝛺) = 3 ( Number of elements)

𝑇𝑇 means: Two flips are observed as tails.


𝑇𝐻 means: One flip is head one is tail (𝐻𝑇 is the same as the 𝑇𝐻, either of them can be used )
𝐻𝐻 means: Two flips are observed as heads.

Events:
𝐴 = {𝑇𝑇}
𝐴 = {𝑇𝐻}
𝐴 = {𝐻𝑇}
𝐴 = {𝐻𝐻}

𝐴 = {𝑇𝑇, 𝑇𝐻}
.
. Number of Events: 23 = 8
.
.
𝐴 =Ω
Student:
5. Flip the three coins at the same time. Write the sample space, define the events.
𝛺 =……………………

𝑛(𝛺) = ……………………

Events:

The number of events:

6. Flip a dice:

Sample space :

𝛺 = {1,2,3,4,5,6}

Events:

𝐴 = {1}
𝐴 = {2}
𝐴 = {3}
. Number of Events: 26 = 64
.
.

𝐸 = {1,2,3,4,5,6}

7. Flip a dice two times.


Sample space :

𝛺 = {(1,1), (1,2), … , (6,6)}

𝑛(𝛺) = 36

Number of Events: 236

Student:

8.Flip the two dices at the same time.


𝛺 =……………………

𝑛(𝛺) = ……………………

Events:

The number of events: ……………..

Event/Set Operations:

1.The complement of an event 𝐴: The set of all elements of S not in 𝐴. It is denoted as 𝐴𝐶

2.The intersection of two events A and B: The set of all elements in both 𝐴 and 𝐵. It is
denoted as 𝐴 ∩ 𝐵.

3.The union of two events A and B: The set of all elements in either 𝐴 and 𝐵. It is denoted as
𝐴 ∪ 𝐵.

4. If 𝐴 ∩ 𝐵=∅; two events are mutually exclusive.


Example:

Experiment: Flip a coin three times.

𝛺 = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇, 𝑇𝐻𝐻, 𝑇𝐻𝑇, 𝑇𝑇𝐻, 𝑇𝑇𝑇}

𝐴: The first flip is head.

𝐴 = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇}

𝐴𝑐 = {𝑇𝐻𝐻, 𝑇𝐻𝑇, 𝑇𝑇𝐻, 𝑇𝑇𝑇}

𝐵: The 3. flip is tail.

𝐵 = {𝐻𝐻𝑇, 𝐻𝑇𝑇, 𝑇𝐻𝑇, 𝑇𝑇𝑇}

𝐴 ∩ 𝐵: The first flip is head, third is tail.

𝐴 ∩ 𝐵={𝐻𝐻𝑇, 𝐻𝑇𝑇} → 𝑨, 𝑩 are not mutually exclusive.

𝐴 ∪ 𝐵: The first flip is head or third is tail.

𝐴 ∪ 𝐵={𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇, 𝑇𝐻𝑇, 𝑇𝑇𝑇}


Probablity of an Event :

The probability of an event is given as;

P( )

where
n : the number of points in cluster .
N : the number of points in Ω sample space.

The Probability Axioms:

For any event ;


1. .
2.
3. The probability of the complement of event ( );

4.
5. If are mutually exclusive;

( Because; )

Independent Events: For any event ( ) If the probability


can be written as ;

The two events are independent from each other.


Note: If are mutually exclusive, they can’t be independent.

Examples:
1.The experiment : Flip a coin two times.
Sample space :

The 1.flip is tail

The 2.flip is head

are not mutually exclusive,

are independent from each other.

2.The experiment : Flip a coin three times.

Student:

At most two flips are heads


=

At At most two flips are tails.

Are they independent events ?

Student:

3.The experiment : Flip the three coins at the same time.

Define some events and calculate the probabilities.


4.The experiment : Flip a dice two times.

The sum of the surface points is seven

The sum of the surface points is odd number


Probablity of an Event :

The probability of an event is given as;

P( )

where
n : the number of points in cluster .
N : the number of points in Ω sample space.

The Probability Axioms:

For any event ;


1. .
2.
3. The probability of the complement of event ( );

4.
5. If are mutually exclusive;

( Because; )

Independent Events: For any event ( ) If the probability


can be written as ;

The two events are independent from each other.

Note: If are mutually exclusive, they can’t be independent.

Examples:
1.The experiment : Flip a coin two times.

Sample space :

The 1.flip is tail

The 2.flip is head

are not mutually exclusive,

are independent from each other.

2.The experiment : Flip a coin three times.

Student:
At most two flips are heads

At At most two flips are tails.

Are they independent events ?

Student:

3.The experiment : Flip the three coins at the same time.

Define some events and calculate the probabilities.


4.The experiment : Flip a dice two times.

The sum of the surface points is seven

The sum of the surface points is odd number


RANDOM VARIABLES: DISCRETE / CONTINUOUS

A random variable associates a real number with each outcome in the sample space. We can
go to Mathematical World from the real World by the random variables. Now; we can study
easier with the ℝ numbers in the mathematical World. Random variables are denoted by the
upper case letters 𝑋, 𝑌, 𝑍. Random Variables values are denoted by the lower case letters
𝑥, 𝑦, 𝑧 . 𝑋 random variable is shown as;

𝑋 : Ω → ℝ
𝑤 → 𝑋(𝑤)
where:
𝐷𝑋 : The set of 𝑋 values. There are two types of random variables: Discrete and Continuous
Random Variables.

Definitions:

Discrete Random Variable: If 𝐷𝑋 is finite or countable (infinite countable), 𝑋 is called


discrete.
Continuous Random Variable: If 𝐷𝑋 consists of an interval or intervals , 𝑋 is called
continuous.

Examples:
1-The experiment : Flip a coin
𝑋: Number of tail.
Ω = {𝐻, 𝑇}


0 1

2-The experiment : Flip a coin two times. GEI


𝑋: Number of tails.
Sample space :

𝛺 = {𝑇𝑇, 𝑇𝐻, 𝐻𝑇, 𝐻𝐻}

𝑛(𝛺) = 4 ( Number of elements)

𝛺 = {𝐻𝐻, 𝐻𝑇, 𝑇𝐻, 𝑇𝑇}


𝑋

ℝ 0 1 2

𝐷𝑋 = {0,1,2} Örnek olarak olasılıklar.


𝑃(𝑋 > 2) = 0 𝑃(𝑋 ≥ 1) = 𝑃(𝑋 = 1) + 𝑃(𝑋 = 2) = 𝑃({𝑇𝑌, 𝑌𝑇}) + 𝑃({𝑌𝑌}) = 3/4

3- Student:
The experiment : Flip a coin three times. Show the random variable, similar to the
examples. Define some probabilities and calculate them.
4 Student: ( Homework)
The experiment : Flip two coins at the same time. Show the random variable, similar to
the examples. Define some probabilities and calculate them.
**Now, we study with the discrete random variable firstly. GEI

Definition:

Probability function:

When 𝑋 is a discrete random variable; the function

𝑓𝑋 (𝑥) = 𝑃(𝑋 = 𝑥), 𝑥𝝐𝐷𝑋

is called probability function (pf) of 𝑋 random variable.

Example 1.
𝑫𝒙 = {𝟎, 𝟏} → 𝑫𝒙 countable infinite 𝑿 discrete.
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 𝑥)

𝑋=𝑥 0 1
𝑃(𝑋 = 𝑥) 1 1
2 2

Example 2.
𝑫𝒙 = {𝟎, 𝟏, 𝟐}
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 𝑥)

𝑋=𝑥 0 1 2
𝑃(𝑋 = 𝑥) 1 2 1
4 4 4

𝑓𝑋 (𝑥)

2
4

1
𝑥
4

0 1 2
Example: GEI
The experiment : A dice is tossed
𝑋 : the number of the surface points
𝐷𝑥 = {1,2,3,4,5,6}
1
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = 6 𝑥 ∈ 𝑫𝒙 = {𝟏, 𝟐, 𝟑, 𝟒, 𝟓, 𝟔}→ 𝑫𝒙 sayılabilir sonlu, 𝑿 kesikli

the graphic of function

1 2 3 4 5 6 𝑥

Example: Flip a coin until the first head.


𝑋 : the number of flips

𝛺 = {𝐻, 𝑇𝐻, 𝑇𝑇𝐻, 𝑇𝑇𝑇𝐻, … . . }


𝑋

ℝ 1 2 3 4 …..

𝑫𝒙 = {𝟏, 𝟐, 𝟑, … . } → 𝑫𝒙 countable infinite, 𝑿 discrete

Properties of the probability function (pf): 𝑋 discrete random variable and 𝑓(𝑥) is its
probability function.

1. 𝑓(𝑥)>0, 𝑥𝜖𝐷𝑥
2. ∑𝑥𝜖𝐷𝑥 𝑓(𝑥)=1
Examples: GEI

1. The probability function of 𝑋 random variable is given as;

𝑓(𝑥) = 𝑐𝑥 2 𝐷𝑋 = {−2, −1,1,2}

a. 𝑐 =?
b. Obtain the probability function, table, graphic.
c. Calculate the probabilities.

𝑃(𝑋 > 2) =? 𝑃(𝑋 ≥ 1) =? 𝑃(0 < 𝑋 ≤ 2) =?

Solution:

1
a .∑𝟐−𝟐 𝑐𝑥 2 =1 → 𝑐 = 10

b. The Probability function.


4
, 𝑥 = −2
10
1
, 𝑥 = −1
𝑓(𝑥) = 10
1
, 𝑥=1
10
4
{ 10 , 𝑥 = 2

𝑋=𝑥 -2 -1 1 2
𝑃(𝑋 = 𝑥) 4 1 1 4
10 10 10 10

5
c. 𝑃 (𝑋 > 2) = 0 , 𝑃(𝑋 ≥ 1) = 𝑃(𝑋 = 1) + 𝑃(𝑋 = 2) = 𝑓(1) + 𝑓 (2) = 10
Student: GEI

2. The probability function of 𝑋 random variable is given as;

𝑓(𝑥) = 𝑐 𝐷𝑋 = {−1,0,1,2}

d. 𝑐 =?
e. Obtain the probability function, table, graphic.
f. Calculate the probabilities.

𝑃(𝑋 > 2) =? 𝑃(𝑋 ≥ 1) =? 𝑃(0 < 𝑋 ≤ 2) =?


*When 𝑋 is continuous random variable (𝐷𝑋 is uncountable ) GEI

𝑏
𝑃(𝑎 < 𝑋 < 𝑏) = 𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = ∫ 𝑓(𝑥)𝑑𝑥
𝑎

where;
𝑓(𝑥) is called probability density function ( pdf ) of 𝑋 random variable.

Properties of the probability density function (pdf): 𝑋 continuous random variable and
𝑓(𝑥) is its probability density function.

1. 𝑓(𝑥) ≥0

2. ∫−∞ 𝑓(𝑥)𝑑𝑥=1

Examples:

𝑋 is continuous random variable, its pdf is given as;


𝑐𝑥 2 , … 0 < x < 1
1. 𝑓(𝑥) = {
0, … 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒𝑠

a. 𝑐 =?
b. 𝑃(0 < 𝑋 ≤ 0.5) = ?
c. 𝑃(𝑋 ≥ 1) =?
d. 𝑃(𝑋 ≤ 1) =?

Solution:

∞ 0 1 ∞
a. ∫−∞ 𝑓(𝑥)𝑑𝑥=1→ ∫−∞ 𝑓(𝑥)𝑑𝑥 + ∫0 𝑓(𝑥)𝑑𝑥 + ∫1 𝑓(𝑥)𝑑𝑥 = 1

0 1 ∞ 1
∫−∞ 0𝑑𝑥 + ∫0 𝑐𝑥 2 𝑑𝑥 + ∫1 0𝑑𝑥 = 1→ 0 + ∫0 𝑐𝑥 2 𝑑𝑥 +0=1→ 𝑐 = 3

0.5
b. 𝑃(0 < 𝑋 ≤ 0.5) = ∫0 3𝑥 2 𝑑𝑥 = 1/8
∞ ∞
c. 𝑃(𝑋 ≥ 1) = ∫1 𝑓(𝑥)𝑑𝑥 = ∫1 0 𝑑𝑥 = 0 GEI

1
d. 𝑃(𝑋 ≤ 1) = ∫0 𝑓(𝑥)𝑑𝑥 = 1

2.Student:
𝑋 is continuous random variable, its pdf is given as;
𝑐𝑥 2 , … − 1 ≤ x ≤ 1
𝑓(𝑥) = {
0, … 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒𝑠

e. 𝑐 =?

b. 𝑃(𝑋 ≤ 0) =?

𝑃(𝑋 ≤ 2) =?

𝑃(𝑋 ≥ 2) =?

𝑃(0 < 𝑋 ≤ 1) = ?

𝑃(𝑋 ≤ 1.5) =?

𝑃(0 < 𝑋 ≤ 2) = ?
EXPECTED VALUE/ VARIANCES:

Definition:
Let 𝑋 be a random variable with pf 𝑓(𝑥), 𝑔(𝑥) be a function of 𝑋. The expected
value of 𝑔(𝑥),

∑ 𝑔(𝑥)𝑓𝑋 (𝑥), 𝑋 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒


𝐷𝑋
𝑬(𝒈(𝑿)) = ∞
∫ 𝑥 𝑓(𝑥)𝑑𝑥 , 𝑋 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠.
{ −∞

Definition:

In this case, 𝑋 is a a random variable with pf 𝑓(𝑥),

a. For discrete random variable , the value 𝐸(𝑋),

𝐸(𝑋) = ∑ 𝑥𝑓𝑋 (𝑥)


𝐷𝑋

is called expected value of 𝑿 random variable.

b. For continuous random variable , the value 𝐸(𝑋),


𝐸(𝑋) = ∫ 𝑥 𝑓(𝑥)𝑑𝑥
−∞

is called expected value of 𝑋 random variable. The value 𝑉𝑎𝑟(𝑋),

2
𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 − 𝐸(𝑋))2 = 𝐸(𝑋 2 ) − (𝐸(𝑋))

is called the variance of 𝑋 random variable.

the value 𝐸(𝑋 𝑘 ) is called the 𝑘. moment of 𝑋 random variable. So where;


𝐸(𝑋 2 ) is called 2. moment o 𝑋 random variable.

𝐸(𝑋 2 ) = ∑𝐷𝑋 𝑥 2 𝑓𝑋 (𝑥) ( for discrete random variable )


𝐸(𝑋 2 ) = ∫−∞ 𝑥 2 𝑓(𝑥)𝑑𝑥 ( for continuous random variable )

Note:

The expected value of 𝑋 random variable is denoted by 𝜇 and the variance of 𝑋 random
variable is denoted by 𝜎 2 . The square root of the variance is called the standard deviation of

𝑋 random variable and denoted by σ.

Laws of the Expected Value:

Let 𝑋 be a random variable and 𝑎 be a constant.

1. 𝐸(𝑎) = 𝑎
2. 𝐸(𝑋 + 𝑎) = 𝐸(𝑋) + 𝑎
3. 𝐸(𝑎𝑋) = 𝑎𝐸(𝑋)

Laws of the Variance:

1. 𝑉𝑎𝑟(𝑎) = 𝑎
2. 𝑉𝑎𝑟(𝑋 + 𝑎) = 𝑉𝑎𝑟(𝑋)
3. 𝑉𝑎𝑟(𝑎𝑋) = 𝑎2 𝑉𝑎𝑟(𝑋)

Theorem: Let 𝑎, 𝑏 𝝐𝐼𝑅,

a. 𝐸(𝑎𝑋 + 𝑏) = 𝑎𝐸(𝑋) + 𝑏

b. 𝑉𝑎𝑟(𝑎𝑋 + 𝑏) = 𝑎2 𝑉𝑎𝑟(𝑋)
Examples:

1
1. 𝑋 is a random vaiable with pf 𝑓(𝑥) = 3 , 𝐷𝑋 = {−1,0,1}

𝐸(𝑋) =?, 𝑉𝑎𝑟(𝑋) =?, 𝐸(𝑋 3 ) =? 𝐸(2𝑋 + 3) =? 𝑉𝑎𝑟(2𝑋 + 3)=?

Solution:

1
1
𝐸(𝑋) = ∑ 𝑥𝑓𝑋 (𝑥) = (−1 + 0 + 1) = 0
3
𝑥=−

1
2)
1 2
𝐸(𝑋 = ∑ 𝑥 2 𝑓𝑋 (𝑥) = ((−1)2 + 0 + 12 ) =
3 3
𝑥=−

2 1
𝑉𝑎𝑟(𝑋) = 3 𝐸(𝑋 3 ) = 3 (−13 + 0 + 13 )=0

𝐸(2𝑋 + 3)=2 𝐸(𝑋) + 3 = 3 𝐸(2)=2 𝑉𝑎𝑟(2) = 0


8
𝑉𝑎𝑟(2𝑋 + 3) = 4𝑉𝑎𝑟(𝑋) = 3

Student: 𝑋 is a random vaiable with pf 𝑓(𝑥)

𝑋=𝑥 2 3 5
𝑓(𝑥) 2 1 1
4 4 4

𝐸(𝑋) =? 𝑉𝑎𝑟(𝑋) =? 𝐸(𝑋 3 ) =? 𝐸(𝑋 + 𝑋 2 ) =? 𝐸(2𝑋 + 4) =? 𝑉𝑎𝑟(2𝑋 + 4) =?


Student: 𝑋 is a random vaiable with pf 𝑓(𝑥)

𝑓(𝑥) = 𝑐𝑥 𝐷𝑋 = {1,2,3}

𝑐 =? 𝐸(𝑋) =? 𝑉𝑎𝑟(𝑋) =? 𝑃(0 < 𝑋 ≤ 1) = ? 𝑃(1 < 𝑋 ≤ 2) = ? 𝑃(𝑋 > 2) = ?

𝑃(𝑋 ≤ 3) = ?
1. 𝑋 is a random vaiable with pdf ;

3𝑥 2 , … 0 < x < 1
𝑓(𝑥) = {
0, … 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒𝑠

𝐸(𝑋) =? 𝑉𝑎𝑟(𝑋) =?
Solution:

1 1 3
𝐸(𝑋) = ∫0 𝑥 𝑓(𝑥)𝑑𝑥 = ∫0 𝑥 3𝑥 2 𝑑𝑥 = 4

1 1
3
𝐸(𝑋 2 ) = ∫ 𝑥 2 𝑓(𝑥)𝑑𝑥 = ∫ 𝑥 2 3𝑥 2 𝑑𝑥 =
0 0 5

2 3 9
𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − (𝐸(𝑋)) = − = 0.0625
5 16

Student: 𝑋 is a random vaiable with pdf ;


3𝑥 2 , … − 1 < x < 1
𝑓(𝑥) = {
0, … 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒𝑠

a. 𝒄 =? 𝐸(𝑋) =? 𝑉𝑎𝑟(𝑋) =? 𝑃(0 < 𝑋 ≤ 1) = ? 𝑃(𝑋 ≤ 1.5) =?


𝑃(0 < 𝑋 ≤ 2) = ? 𝑃(𝑋 ≥ 2) =? 𝑃(𝑋 ≤ 2) =?
Study Questions ( At Home) :

1.What is the value of the 𝑐 constant . Obtain the 𝑐 constant; then calculate the 𝐸(𝑋) =?
𝑉𝑎𝑟(𝑋) =?. Define some probabilities and calculate them.

𝑓(𝑥) = 𝑐𝑥 2 , 𝐷𝑋 = {−3, −2, −1, 1,2,3}

4
𝑓(𝑥) = 𝑐 ( ), 𝐷𝑋 = {0, 1,2,3,4}
𝑥

2.What is the value of the 𝑐 constant . Obtain the 𝑐 constant; then calculate the 𝐸(𝑋) =?
𝑉𝑎𝑟(𝑋) =?. Define some probabilities and calculate them.
𝑐𝑥, … 0 < x < 2
𝑓(𝑥) = {
0, … 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒𝑠

𝑓(𝑥) = {𝑐√𝑥, … 0 < x < 4


0, … 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒𝑠
Transformation of a Random Variable:

Example:

1.

𝑋 is a random vaiable with pf 𝑓(𝑥)

1
𝑓(𝑥) = 5 𝐷𝑋 = {−2, −1,0,1,2, } . 𝑌 is a random variable defined as 𝑌 = 𝑋 2 .

Obtain the pf of 𝑌 random variable.

Solution:

First we have to obtain the 𝐷𝑌

𝑌 = 𝑋 2 → 𝐷𝑌 = {0,1,4}

1
𝑓𝑌 (0) = 𝑃(𝑌 = 0) = 𝑃(𝑋 2 = 0) = 𝑃(𝑋 = 0) =
5

2
𝑓𝑌 (1) = 𝑃(𝑌 = 1) = 𝑃(𝑋 2 = 1) = 𝑃(𝑋 = 1) + 𝑃(𝑋 = −1) =
5

2
𝑓𝑌 (4) = 𝑃(𝑌 = 4) = 𝑃(𝑋 2 = 4) = 𝑃(𝑋 = 2) + 𝑃(𝑋 = −2) =
5

𝑌=𝑦 0 1 4
𝑃(𝑌 = 𝑦) 1 2 2
5 5 5

Student: 𝑋 is a random vaiable with pf 𝑓(𝑥)

𝑥2
𝑓(𝑥) = 10 𝐷𝑋 = {−2, −1, ,1,2, } . 𝑌 is a random variable defined as 𝑌 = 𝑋 + 2.

Obtain the pf of 𝑌 random variable.


Some Special Discrete Random Variables:

1. Bernoulli Random Variable

2. Binom Random Variable

3.Geometric Random Variable

4.Poisson Random Variable

Bernoulli Random Variable:

Bernoulli Experiment: The experiment consists of one trial. There are two outcomes called
failure and success. It can result in one of 2 outcomes.

𝑋: The number of successes in one trial.

𝐷𝑋 = {0,1} dir. The probability function of 𝑋 Bernoulli Random Variable is

𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = 𝑝 𝑥 (1 − 𝑝)1−𝑥 , 𝑥 = 0,1


The probability table is given,
𝑥 0 1
𝑃(𝑋 = 𝑥) 𝑞 =1−𝑝 𝑝

where;

𝑝: The probability of success

𝑞 = 1 − 𝑝: The probability of failure.


Examples ( Bernoulli Experiments)

1.Tossing a coin
Sucess: head ( or tail randomly; it means : absent or present )

2. There are black and white balls in a box. Select and record the color of the ball.

Only For one trial.

Success: Black ( or white randomly; it means : absent or present )

The Expected Value and the Variance of 𝑋

𝐸(𝑋) = ∑ 𝑥 𝑓(𝑥) = 0(1 − 𝑝) + 1𝑝 = 𝑝


𝑥

𝐸(𝑋 2 ) = ∑ 𝑥 2 𝑓(𝑥) = 02 (1 − 𝑝) + 12 𝑝 = 𝑝
𝑥

𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − [𝐸(𝑋)]2 = 𝑝 − 𝑝2 = 𝑝(1 − 𝑝) = 𝑝𝑞

dır. Notation:

𝑋~𝐵𝑒𝑟𝑛𝑜𝑢𝑙𝑙𝑖(1, 𝑝).

2. Binomial Random Variable:

Conditions of Binomial Experiment:

1.Experiment consists of a series of 𝑛 identical trails.


2.Each trial is called a Bernoulli Trial.

3.Experiment consists of 𝑛 repetad trails.

3. Two possible outcomes: Failure and Success.

4. 𝑝: The probability of success.

5.Each trail is independent.


Under these conditions ;

Experiment is called: Binomial Experiment,

𝑋 is called : Binomial Random Variable,

where;

𝐷𝑋 = {0,1,2, … , 𝑛} ; the probability function of 𝑋 ;

𝑛
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = ( ) 𝑝 𝑥 𝑞 𝑛−𝑥 , 𝑥 = 0,1, … , 𝑛
𝑥
The Expected Value and the Variance of 𝑋

𝐸(𝑋) = 𝑛𝑝
𝑉𝑎𝑟(𝑋) = 𝑛𝑝𝑞
dır. Notation:
𝑋~𝐵𝑖𝑛𝑜𝑚(𝑛, 𝑝)

Examples:

1.There are black and white balls in a box. Select and record the color of the ball. Put it back
and re-pick (sampling with replacement).

•𝑛: number of independent and identical trials

•𝑝: probability of success (e.g. probability of picking a black ball)

•𝑋: number of successes in n trials

2.Tossing a coin ( Success: Head) in two times.


Examples:

1.
For an exam have 20 questions with 5 multiple choices.
𝑋: The number of the correctly marked questions.

a. 𝑃(𝑋 ≥ 10) =?
b. 𝐸(𝑋) =?
Solution:
a.

1
𝑋~𝐵𝑖𝑛𝑜𝑚(𝑛 = 20, 𝑝 = )
5
𝑥 20−𝑥
20 1 4
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = ( ) , 𝑥 = 0,1, … ,20
𝑥 5 5

20 1𝑥 420−𝑥
𝑃(𝑋 ≥ 10)=∑20
𝑥=10 ( )
𝑥 5 5

b.

𝐸(𝑋) = 𝑛𝑝 = 4

Student:

The special machine produces a 5 pieces per day.

4
𝑝 = 5 : The probability to produce the piece perfectly

𝑋: The number of pieces produced perfectly in one day.

a. Obtain the probability function.


b. 𝐸(𝑋) =?
Homework:

Experiment: Tossing a coin three times .

𝑋: The number of tails. ( Success is defined As tail.it means absent or present)

𝑋 is a Binomial Random Variable.

a. Show the notation.


b. Obtain the probability function.
c. 𝐸(𝑋), 𝑉𝑎𝑟(𝑋) =?
Stat 250
Probability and Statistics : Dr Gültaç Eroğlu İNAN

Geometric Random Variable:

Let a Bernoulli experiment has the probability of success 𝑝 repeates until the first success
achieved ( under the same conditions, independently). Where 𝑋 is defined as;

𝑋 : The number of trials until the first success is achieved.


𝐷𝑋 = {1, … }

𝑋 is called as Geometric Random Variable. The pf of 𝑋 random varaiable is given as;

𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = 𝑝(1 − 𝑝)𝑥−1 , 𝑥 = 1,2,3, … 0 < 𝑝 < 1

dır. Burada;

𝑝:The probability of success ( parameter)

𝑞 = 1 − 𝑝: The probability of failure.

The expected value and the varaince of the Geometric Random Variable:
1
𝜇 = 𝐸(𝑋) =
𝑝
1−𝑝
𝜎 2 = 𝑉𝑎𝑟(𝑋) =
𝑝2
Notation:
𝑋~𝐺𝑒𝑜(𝑝)
Examples:

1. For a shooter, the probability of hitting a certain target 𝑝 is 0,75.

The shooter repeats the trials until the first shot achieved ;

a) Define the 𝑋.

b) 𝐸(𝑋) =? 𝑉𝑎𝑟(𝑋) =?

c) What is the proability that; the number of trials is less than 4?

d) What is the proability that; at least the number of trials is 3?

Solution:
a)
𝑋 : The number of trials.

𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = 0,75 (0,25)𝑥−1 𝑥 = 1,2,3, …

1 4
𝐸(𝑋) = =
𝑝 3
1−𝑝 4
𝑉𝑎𝑟(𝑋) = =
𝑝2 9
b)
63
𝑃(𝑋 < 4) = 𝑓(1) + 𝑓(2) + 𝑓(3) =
64
c)
1
𝑃(𝑋 ≥ 3) = 1 − 𝑃(𝑋 < 3) = 1 − (𝑓(1) + 𝑓(2)) =
16

2.
There are 7 white and 5 black balls in a box. Select a ball and record the color of the ball. Put
it back and re-pick (sampling with replacement). Where;

𝑋: The number of trials to get the first black ball.


a) What is the probability that the first black ball is achieved at the 5.trials.
b) 𝐸(𝑋) =? 𝑉𝑎𝑟(𝑋) =?
c) What is the probability that : the number of trials is more than 4

Solution:
Poisson Random Variable :

This Distribution is used in the modeling of experiments that give discrete results in
continuous environments (time, area, )
𝑋 : The number of occurrences in a given (0, 𝑡] time interval.

Examples:

1.The number of accidents in a certain way.

2.The number of customers in the shop.

𝐷𝑋 = {0,1, … } . The pf of 𝑋 random varaiable is given as;

𝑒 −𝜆 𝜆𝑥
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = , 𝑥 = 0,1,2, …
𝑥!
dır.
𝜆: average number of occurences.
Notation:

𝑋~𝑃𝑜𝑖𝑠𝑠𝑜𝑛(𝜆)
The expected value and the varaince of the Geometric Random Variable:

𝜇 = 𝐸(𝑋) = 𝜆
𝜎 2 = 𝑉𝑎𝑟(𝑋) = 𝜆

Examples:
The average number of the patients coming to a hospital’s emergency servise over a 15
minute interval is 4. In this period of time;

a) What is the probability that; no patient came to service?


b) What is the probability; that the number of patients is 1?
c) What is the probability that ; the number of patients is least 2?
d) What is the probability that; the number of patients is at most 3 ?
Solution:
a)
𝑋:
The number of patients over a 15 minutes interval.
𝑒 −𝜆 𝜆𝑥
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = , 𝑥 = 0,1,2, …, 𝜆=4
𝑥!

𝑒 −4 40
𝑃(𝑋 = 0) = = 0.0183
0!

b)
𝑒 −4 41
𝑃(𝑋 = 1) = = 4 ∗ 0.0183 = 𝟎. 𝟎𝟕𝟑𝟐
1!

c) 𝑃(𝑋 ≥ 2) =1- 𝑃(𝑋 < 2) =

=𝟏 − (𝑓(0) + 𝑓(1)
= 𝟏 − (𝑒 −4 + 4𝑒 −4 )
= 𝟏 − (5 ∗ 𝑒 −4 )
= 𝟏 − (5 ∗ 0.0183)
d)

𝑃(𝑋 ≤ 3) = (𝑓(0) + 𝑓(1) + 𝑓(2) + 𝑓(3))


32
=(𝑒 −4 + 4𝑒 −4 + 8𝑒 −4 + 𝑒 −4 )
3
71
= 3 𝑒 −4

Student:
In a city; there an average 5 traffic accidents in a day. For a certain day what is the probability
that; the number of accidents
a) is 6?
b) is less than 6?
c) is more than 6?
d) is zero?
e) for a certain month, is 100?

Solution:
20.04.2020

STA 250: PROBABILITY and STATISTICS


MIDTERM EXAM

Question 1: Flip a coin three times.


a. Define two events: 𝐴 and 𝐵
b. Are they independent / exclusive?
c. Define a conditional proability and calculate this probability.

Question 2: Flip the three coins at the same time.


a.Define two events: 𝐴 and 𝐵
b.Are they independent / exclusive?
c.Define a conditional proability and calculate this probability.

Question 3: Flip the two dices at the same time.


a.Define two events: 𝐴 and 𝐵
b. Are they independent / exclusive?
c.Define a conditional proability and calculate this probability.

Question 4: Flip a dice two times.


d. Define two events: 𝐴 and 𝐵
e. Are they independent / exclusive?
f. Define a conditional proability and calculate this probability.
Question 5: For 𝑋 discrete random variable has 𝑓𝑋 (𝑥) probability function with 𝑐
a. Define 𝑓(𝑥) = 𝑐 …. 𝐷𝑋 = {… … } tanımlayınız.
b. Obtain 𝑐 constant.
c. Calculate the 𝐸(𝑋), 𝑉𝑎𝑟(𝑋) values.
d. Define 5 probabilities and calculate them.

Question 6: For 𝑋 continuous random variable has 𝑓𝑋 (𝑥) probability density function with
𝑐
e. Define 𝑓(𝑥) = 𝑐 …. 𝐷𝑋 = (. , . )
f. Obtain 𝑐 constant.
g. Calculate the 𝐸(𝑋), 𝑉𝑎𝑟(𝑋) values.
h. Define 5 probabilities and calculate them.

Question 7:
Define a Bernoulli Experiment and obtain the proability function.
Question 8:
Define a Binomial Experiment.
a. Define 𝑋: “…………………..” like that
b. Obtain the pdf
c. Calculate the 𝐸(𝑋), 𝑉𝑎𝑟(𝑋) values.
d. Define 5 probabilities and calculate them.
Question 9:
Define an experiment for Geometric Random Variable.
a.Define 𝑋: “…………………..” like that
b. Obtain the pdf
c.Calculate the 𝐸(𝑋), 𝑉𝑎𝑟(𝑋) values.
d.Define 5 probabilities and calculate them.
Question 10:
Define an experiment for Poisson Random Variable.
a..Define 𝑋: “…………………..” like that
b. Obtain the pdf
c.Calculate the 𝐸(𝑋), 𝑉𝑎𝑟(𝑋) values.
d.Define 5 probabilities and calculate them.
Some Special Continuous Random Variables:

Normal Random Variable :


Standard Normal Random Variable:
𝒕 Random Variable:

Normal Random Variable :


Normal distribution is a very important distribution used in both applied and theoretical
statistics. The reason why the normal distribution has an important place in statistics is that
many observation results give a bell-shaped distribution and most distributions approach
normal distribution as the number of observations increases. The probability density function
of 𝑋 random variable is given by,

1 1 𝑥−𝜇 2
𝑒 2 𝜎 ) , −∞
− (
𝑓(𝑥) = < 𝑥 < ∞, −∞ < 𝜇 < ∞, 𝜎 2 > 0
𝜎√2𝜋

𝜇: average ( parameter )
𝜎 2 : variances ( parameter )
e = 2.71825
π = 3.1416

Notation: 𝑋~𝑁(𝜇, 𝜎 2 )
The probability density functions graphs of normal random variables with (𝜎 2 = 9) variances
but different expected values 𝜇 = −5, −2.5,0,3,6.6 . ( Ozturk 2010 ).
0.14

0.12
𝑋~𝑁(6.6,9)
0.1 𝑋~𝑁(3,9)
0.08 𝑋~𝑁(0,9)

0.06
𝑋~𝑁(−2.5,9)

0.04 𝑋~𝑁(−5,9)

0.02

0
-15 -10 -5 0 5 10 15

Properties of the Normal Random Variable

1.
+∞
∫ 𝑓(𝑥) 𝑑𝑥 = 1
−∞

2. The normal distribution is symmetrical with respect to the mean. It means;

𝜇 +∞
1
∫ 𝑓(𝑥) 𝑑𝑥 = ∫ 𝑓(𝑥) =
−∞ 𝜇 2

If , 𝜇 = 0 𝜎 2 = 1, the normal random variable is called standard normal random variable.The


standard normal random variable is denoted by the letter 𝑍.

Notation: 𝑍~𝑁(0,1)
The probability density function of Z random variable is given by,

1 1 2
𝑓(𝑧) = 𝑒 −2𝑧 , −∞ < 𝑧 < ∞
√2𝜋
Transformation:

𝑋−𝜇
If 𝑋~𝑁(𝜇, 𝜎 2 ) is normal random variable, 𝑍 = is a standard normal random variable. In
𝜎
this case;

𝑋−𝜇 𝑥−𝜇
𝑃(𝑋 ≤ 𝑥) = 𝑃 ( ≤ )
𝜎 𝜎
= 𝑃(𝑍 ≤ 𝑧)

This is called standardization. From the symmetry property;

𝑃(𝑍 ≤ −𝑎) = 𝑃(𝑍 ≥ 𝑎)


= 1 − 𝑃(𝑍 < 𝑎)

For the probabilities calculations, the 𝑍 table prepared with the values 0 to nearly 4 is used.
𝑍 table is given as follows;
Examples: Reading the Table

1.
𝑃(𝑍 < 1.5) = 0.9332→ 𝑃(𝑍 > 1.5) = 1 − 0.9332 = 0.0668

𝑃(𝑍 < 2.2) = 0.9861→ 𝑃(𝑍 > 2.2) = 1 − 0.9861 = 0.0139

𝑃(𝑍 < 0.42) = 0.6628 → 𝑃(𝑍 > 0.42) = 1 − 0.6628 = 0.3372

𝑃(𝑍 < 1.53) = 0.9370 → 𝑃(𝑍 > 1.53) = 1 − 0.9370 = 0.0630

2. 𝑃(𝑍 < 𝑎) = 0.9878 → 𝑎 = 2.25

3. 𝑃(𝑍 > 𝑎) = 0.0301 → 𝑃(𝑍 < 𝑎) = 0.9699 → 𝑎 = 1.88

4. Student
*𝑃(𝑍 > 1.36) =?

∗ 𝑃(𝑍 < 𝑎) = 0.8264 →𝑎 =?

* 𝑃(𝑍 > 𝑎) = 0.0495→ 𝑎 =?

5. 𝑃(1 < 𝑍 < 2) =?

𝑃(1 < 𝑍 < 2) = 𝑃(0 < 𝑍 < 2) − 𝑃(0 < 𝑍 < 1)


= 0.4773 − 0.4413

=0.036
6. 𝑃(𝑍 < −1) =?

𝑃(𝑍 < −1) = 𝑃(𝑍 > 1) = 1 − 𝑃(𝑍 < 1)


=1-0.8413=0.1587

7. 𝑃(𝑍 > −2.64) =?

𝑃(𝑍 > −2.64) = 𝑃(𝑍 < 2.64)=0.9959

8. 𝑃(−1.32 < 𝑍 < 2.87) = 𝑃(𝑍 < 2.87) − 𝑃(𝑍 < −1.32)
=𝑃(𝑍 < 2.87) − 𝑃(𝑍 > 1.32)

= 𝑃(𝑍 < 2.87) − (1 − 𝑃(𝑍 < 1.32))

= 𝑃(𝑍 < 1.32) + 𝑃(𝑍 < 2.87) − 1


=0.9066+0.9980-1
=0.9046

9. 𝑃(−3 < 𝑍 < 3) = 2 ∗ 𝑃(0 < 𝑍 < 3)


=2*0.4986
=0.9972
Student:

10. 𝑃(−1.32 < 𝑍 < −2.87) =?

11. 𝑃(−1.32 < 𝑍 < 0) =?

12. 𝑃(−1.32 < 𝑍 < 𝑎) = 0.1272→ 𝑎 =?

𝟏𝟑. 𝑃(𝑍 < 𝑎) = 0.1271→ 𝑎 =?

14. 𝑃(0 < 𝑍 < 𝑎) = 0.4032 → 𝑎 =?


Dr.Gültaç E.İNAN

Transformations from 𝑿 to 𝒁

𝑋−𝜇
𝑋~𝑁(𝜇, 𝜎 2 ) normal random variable→ 𝑍 = standard normal random variable.
𝜎

Percentile:
The 1 − 𝛼𝑡ℎ percentile of a set of measurements is the value (𝑧𝛼 )for which at most 1 − 𝛼%
of the measurements are less than that value.

𝑃(𝑍 > 𝑧𝛼 ) = 𝛼

𝑃(𝑍 < 𝑧𝛼 ) = 1 − 𝛼→ 𝑧𝛼 : 1 − 𝛼𝑡ℎ percentile

Example: 90𝑡ℎ percentile means:


𝑃(𝑍 < 𝑧0.10 ) = 0.90 → 𝑧0.10 : 90𝑡ℎ percentile

Examples: For Most used 𝛼 Values.

1.

𝑃(𝑍 < 𝑧0.05 ) = 0.95 (𝟗𝟓𝒕𝒉 percentile)


1.65
𝑧0.05 = 1.645 (1.64 + = 𝟏. 𝟔𝟒𝟓)
2

2. (𝟗𝟕𝟓𝒕𝒉 percentile)

𝑃(𝑍 < 𝑧0.025 ) = 0.975 → 𝒛𝟎.𝟎𝟐𝟓 =1.96

3. (𝟗𝟎𝒕𝒉percentile)
𝑃(𝑍 < 𝑧0.10 ) = 0.90
(1.28 + 1.29)
𝒛𝟎.𝟏𝟎 = = 𝟏. 𝟐𝟖𝟓
2

Examples:

𝑋 : Lifetime for a particular type of battery.It is known that;


𝑋~𝑁(𝜇 = 35 ℎ𝑜𝑢𝑟𝑠, 𝜎 2 = 16 ℎ𝑜𝑢𝑟𝑠)
a. For a randomly selected battery, 𝑃(𝑋 ≥ 45) ( Life time of the battery is more than 45
hours)
Solution:
𝑋 − 35 45 − 35
𝑃( ≥ ) = 𝑃(𝑍 ≥ 2.5) = 1 − 𝑃(𝑍 < 2.5) = 1 − 0.9938 = 0.0062
4 4
40−35 45−35 5 10
b. 𝑃(40 < 𝑋 < 45) = 𝑃 ( <𝑍< ) = 𝑃 (4 < 𝑋 < )
4 4 4

= 𝑃(1.25 < 𝑍 < 2.5)

= 𝑃(𝑍 < 2.5)- 𝑃(𝑍 < 1.25)


=0.9938-0.8944
=0.0994

c.Student:
𝑃(𝑋 < 40) =?

d. 95.percentile of 𝑋=?

𝑃(𝑋 < 𝑥) = 0.05→ 𝑥 =?

Solution:
𝑃(𝑍 < 𝑎) = 0.95→ 𝑎 = 𝑧0.05 = 1.645

𝑥 − 35
𝑎 = 1.645 → 1.645 = → 𝑥 = 1.645 ∗ 4 + 35 → 𝑥 = 41.58
4
e. 90.percentile of 𝑋=?

Example: Student
The amount of time it takes to assemble a computer is normally distributed, with a mean of 50
minutes and a standard deviation of 10 minutes. What is the probability that

a.

a computer is assembled in a time between 45 and 60 minutes?

b. Define some probabilities and calculate.

c. 95.percentile of 𝑋=?
Basic Sampling Theory:

Population: is the set (possibly infinite) of all possible observations. Each observation is a
random variable 𝑋 having some probability distribution.

In real life calculating parameters of populations is usually impossible because populations are
very large. Rather than investigating the whole population, we take a sample, calculate a
statistic related to the parameter of interest, and make an inference.

Each observation 𝑋𝑖 in a random sample is a representative of unobserved variables in


population.

Sample: is a subset of population


Observation: Each value in the sample; 𝑋𝑖 .
Sample Size: The number of the observations. 𝑛
Data: Set of values in the sample.

Statistic: A function of rvs (usually a sample rvs in an estimation) which does not contain any
unknown parameters.
Parameter: Characteristic or measure obtained from a population. (is a numerical measure
that describes a characteristic of a population)

Estimator: The sample statistics used to estimate the population parameter is called the
estimator.
Estimate: The particular value of an estimator.

Population Sample
Mean

Variance
Parameter Estimator
(Statistic)

Variable: is a characteristic about each individual element of a population or sample.


Qualitative Variables: Variables which assume non numerical values.(hair colour, eyes
colur)

Quantitative Variables: Variables which assume numerical values.( weight, height)

Sample Mean: Arithmetic average of the velues in the sample. ( estimator for μ: statistic)

∑𝑛𝑖=1 𝑥𝑖
𝑥̅ =
𝑛

𝑥𝑖 : i. observation value in the sample .


n : sample size

Population Mean: μ (parameter)

Sample Variance: . ( estimator for 𝜎 2 : statistic)


It is a measure that shows how variance observation results can different from the arithmetic
mean.

2
(∑𝑛𝑗=1 𝑥𝑗 )
∑𝑛𝑗=1(𝑥𝑗 − 𝑥̅ ) 2 ∑𝑛𝑗=1 𝑥𝑗2 −
𝑠2 = = 𝑛
𝑛−1 𝑛−1

Sample standard deviation is given by;

2
𝑛 2
(∑𝑛𝑗=1 𝑥𝑗 )
𝑛
∑𝑗=1(𝑥𝑗 − 𝑥̅ ) 2 √∑𝑗=1 𝑥𝑗 − 𝑛
𝑠=√ = = √𝑉𝑎𝑟𝑖𝑎𝑛𝑐𝑒
𝑛−1 𝑛−1

Population Variance: 𝜎 2 ( parameter)


Sample standard deviation: 𝜎 (parameter)

Range:
𝑅 = 𝑥𝑚𝑎𝑥 − 𝑥𝑚𝑖𝑛
Mode: Most repeated value in the sample.

Median:

First of all, the available data is sorted in order of size (small to large).

n+1
𝑥j , j= ; n: odd
𝑚𝑒𝑑𝑖𝑎𝑛 = {𝑥 + 𝑥 2
j j+1 n
, j = ; 𝑛: 𝑒𝑣𝑒𝑛
2 2

Range
𝑅 = 𝑚𝑎𝑥 𝑣𝑎𝑙𝑢𝑒 − min 𝑣𝑎𝑙𝑢𝑒

Example:

𝑋 𝑖 : Lifetime for a particular type of battery


Observations
𝑋 𝑖 : 45 30 38 40 40 35 43 34 40 35 𝑖 = 1, … ,10 𝑛 = 10 Sample Size
Obtain the sample mean, sample variances, sample standard deviation, mode, median,
range.

Solution:
∑𝑛𝑖=1 𝑥𝑖 45 + ⋯ + 35
𝑥̅ = = = 38
𝑛 10

2
(∑𝑛𝑗=1 𝑥𝑗 )
∑𝑛𝑗=1(𝑥𝑗
− 𝑥̅ ) 2 ∑𝑛𝑗=1 𝑥𝑗2 −
𝑠2 = = 𝑛
𝑛−1 𝑛−1

2
(∑𝑛𝑗=1 𝑥𝑗 ) = 380 (∑𝑛𝑗=1 𝑥𝑗 ) = 144.400
𝑛

(∑ 𝑥𝑗 2 ) = 14.624
𝑗=1

2
(∑𝑛𝑗=1 𝑥𝑗 ) 144.400
∑𝑛𝑗=1 𝑥𝑗2 − 14.624 − 10
𝑠2 = 𝑛 = = 20.44
𝑛−1 9

𝑠 = 4.52

Mode=40 ( three repeats )

Median=?

First of all, the available data is sorted in order of size (small to large).

𝑋 𝑖 : 30 34 35 35 38 40 40 40 43 45

n 𝑥j +𝑥j+1
j= 𝑛 ç𝑖𝑓𝑡→
2 2

𝑥5 +𝑥6 38+40
j = 5 →median = = 39
2 2

𝑅 = 45 − 30 = 15

Student:
The grades that the students have taken in a particular course are given below.

𝑋 𝑖 : 60 55 67 71 74 32 28 50 55 58 90 100 76 55 63 98 55 𝑖 = 1, … ,17
𝑛 = 17 Sample Size
Obtain the sample mean, sample variances, sample standard deviation, mode, median,
range.
Confidence Intervals-Hypothesis Tests:

Population Sample
Mean

Variance
Parameter Estimator
(Statistic)

There are two types of estimation.


1.Point Estimation:
The value of the sample statistics used to estimate an audience parameter is called a point
estimate. (𝜇̂ =5)

2.Interval Estimation: is a range that contains the values used to estimate the parameter.
Where;
1 − 𝛼: 𝐶𝑜𝑛𝑓𝑖𝑒𝑛𝑐𝑒 𝐿𝑒𝑣𝑒𝑙 : The probability of the including the parameter.

Most used 1 − 𝛼 values. %90, %95 ve %99’ dır.

Confidence Intervals:

1. 𝝈𝟐 is known.

𝜎2 𝑥̅ − 𝜇
𝑋̅~𝑁 (𝜇, ), 𝑍= ~𝑁(0, 1)
𝑛 𝜎/√𝑛

𝑃(−𝑍𝑇(𝛼⁄2) ≤ 𝑍 ≤ 𝑍𝑇(𝛼⁄2) ) = 1 − 𝛼
𝑥̅ − 𝜇
𝑃 (−𝑍𝑇(𝛼⁄2) ≤ ≤ 𝑍𝑇(𝛼⁄2) ) = 1 − 𝛼
𝜎/√𝑛
𝜎 𝜎
𝑃 (𝑥̅ − 𝑍𝑇(𝛼⁄2) ≤ 𝜇 ≤ 𝑥̅ + 𝑍𝑇(𝛼 ⁄2) )=1−𝛼 𝑤𝑖𝑡ℎ (1 − 𝛼) confidence level
√𝑛 𝑛

Confidence interval for 𝜇

2. 𝝈𝟐 is unknown. (𝒏 < 30)

𝑥̅ −𝜇
𝑡 = 𝑠/ ~𝑡𝑛−1
√𝑛

𝑃(−𝑡𝑇(𝛼/2, 𝑛−1)≤ 𝑡 ≤ 𝑡𝑇(𝛼/2, 𝑛−1) ) = 1 − 𝛼


𝑥̅ − 𝜇
𝑃 (−𝑡𝑇(𝛼/2, 𝑛−1) ≤ ≤ 𝑡𝑇(𝛼/2, 𝑛−1) ) = 1 − 𝛼
𝑠/√𝑛
𝑠 𝑠
𝑃 (𝑥̅ − 𝑡𝑇(𝛼, 𝑛−1) √𝑛
≤ 𝜇 ≤ 𝑥̅ + 𝑡𝑇(𝛼/2, 𝑛−1) √𝑛) =1−𝛼 𝑤𝑖𝑡ℎ (1 − 𝛼) confidence level
2
Confidence interval for 𝜇

Note: When 𝑛 > 30; z statistics is used instead of 𝑡 statistics.


Hypothesis Test:

Basic Definitions:

1.Hypothesis: Conjectures; whose validity can be investigated according to probability


principles and put forward to make decisions, are called "hypothesis" in statistics.

2.Hypothesis Test: Analysis of hypothesis with the help of sampling.

3.Null-Alternative Hypothesis:
𝐻0 → null hypothesis
𝐻1 ya da 𝐻𝑠 → Alternative Hypothesis
Example:
4.One tailed hypothesis:
𝐻0 : 𝜇 = 5 ya da 𝐻0 : 𝜇 = 5
𝐻1 : 𝜇 < 5 𝐻1 : 𝜇 > 5

5.Two tailed hypothesis:


𝐻0 : 𝜇 = 5
𝐻1 : 𝜇 ≠ 05

6.Test Statistic: The sample statistic on which we base our decision to reject or not reject the
null hypothesis.

7.Rejection Region: Range of values such that, if the test statistic falls in that range, we will
decide to reject the null hypothesis, otherwise, we will not reject the null hypothesis.
Hypothesis Test for Population Mean μ

1. Population Variance is known.

1) Determining 𝐻0 and 𝐻1

2) Calculate the Test Statistic value.

3) Deciding the critical region.


4) Conclusion

0.4

0.35

0.3

0.4 0.25

0.35 0.2

0.3
0.15

0.25
0.1

0.2
0.05

0.15
0
-4 -3 -2 -1 0 1 2 3 4
0.1

0.05

0
-4 -3 -2 -1 0 1 2 3 4

reject ise reject or


ise reject
Otherwises→𝐻0 can’t be rejected.

2. Population Variance is unknown. ( )

1)Determining 𝐻0 and 𝐻1
2)Calculate the test statistic value.

3) Deciding the critical region.


4)Conclusion

0.4 0.4

0.35 0.35

0.3 0.3

0.25 0.25

0.2 0.2

0.15 0.15

0.1 0.1

0.05 0.05

0
-4 -3 -2 -1 0 1 2 3 4 0
-4 -3 -2 -1 0 1 2 3 4

reject ise reject or

reject

Otherwises→𝐻0 can’t be rejected.

Note: When 𝑛 > 30; z statistics is used instead of 𝑡 statistics.


Examples:

1.
A manufacturer of sports equipment has developed a new synthetic fishing line that the
company claims has a mean breaking strength of 8 kilograms with a standard deviation of 𝝈 =
𝟎. 𝟓 kilogram. Test the hypothesis that 𝝁 = 𝟖 kilograms against the alternative that , 𝝁 ≠ 𝟖
kilograms if a random sample of 𝒏 = 𝟓𝟎 lines is tested and found to have a mean breaking
strength of 𝒙 = 𝟕. 𝟖 kilograms. Use a 𝜶 = 𝟎. 𝟎𝟏 level of significance.

1.

𝐻0 : 𝜇 = 8
𝐻1 : 𝜇 ≠ 8
2. Calculate the test statistic value.
𝑥̅ − 𝜇 7.8 − 8
𝑍𝑐 = = = −𝟐. 𝟖𝟑
𝜎/√𝑛 0.5/√50
3.

0.005
0.005

−𝑍𝑇(𝛼/2) 𝑍𝑇(𝛼/2)

𝑍𝑐 = −2.83 < −𝑍𝑇(𝛼) =


2

−2.575 𝐻0 is rejected.
Decision: 𝑧𝑐 = −2.83 < −2.575 𝑯𝟎 is rejected.
Confidence Interval:

𝜎 𝜎
𝑃 (𝑥̅ − 𝑍𝑇(𝛼⁄2) ≤ 𝜇 ≤ 𝑥̅ + 𝑍𝑇(𝛼⁄2) ) = 0.99
√𝑛 √𝑛

𝜎 0.5
𝑥̅ ∓ 𝑍𝑇(𝛼⁄2) = 7.8 ∓ 2.575
√𝑛 √50

𝝁: [𝟕, 𝟔𝟏, 𝟕, 𝟗𝟖]


2.

Random sample of 𝒏 = 𝟏𝟎𝟎 recorded deaths in the United States during the past year showed
an average life span of ̅ = 𝟕𝟏. 𝟖 years. Assuming a population standard deviation of σ= 8.9
𝒙
years, does this seem to indicate that the mean life span today is greater than 𝝁 > 𝟕𝟎 years?
Use a 0.05 level of significance. Obtain the confidence interval.

a.
1.
𝐻0 : 𝜇 = 70
𝐻1 : 𝜇 > 70
2. Calculate the test statistic value.
𝑥̅ − 𝜇 71.8 − 70
𝑍𝑐 = = = 𝟐. 𝟎𝟐
𝜎/√𝑛 8.9/√100

0.4

0.35

0.3

0.25

𝛼
0.2

0.15 𝛼
0.1

0.05

0
-4 -3 -2 -1 0 1 2 3 4

𝑍𝑇(𝛼) =
𝟏.645

Decision: 𝑧𝑐 = 2.02 > 1.645 𝑯𝟎 is rejected.


b. Confidence Interval

𝜎 𝜎
𝑃 (𝑥̅ − 𝑍𝑇(𝛼⁄2) ≤ 𝜇 ≤ 𝑥̅ + 𝑍𝑇(𝛼⁄2) ) = 0.99
√𝑛 √𝑛

𝒁𝑻(𝟎.𝟎𝟐𝟓) = 𝟏. 𝟗𝟔

𝜎 8.9
𝑥̅ ∓ 𝑍𝑇(0.025) = 71.8 ∓ 1.96
√𝑛 √100

𝝁: [𝟕𝟎. 𝟎𝟓, 𝟕𝟑. 𝟓𝟒]


3.

The Edison Electric Institute has published figures on the number of kilowatt hours used
annually by various home appliances. It is claimed that a vacuum cleaner uses an average of 46
kilowatt hours per year. If a random sample of 𝒏 = 𝟏𝟐 homes included in a planned study
indicates that vacuum cleaners use an average of 𝒙 = 𝟒𝟐 kilowatt hours per year with a standard
deviation of 𝑺 = 𝟏𝟏. 𝟗 kilowatt hours, does this suggest at the 0.05 level of significance that
vacuum cleaners use, on average, less than 𝝁 = 𝟒𝟔 kilowatt hours annually? Assume the
population of kilowatt hours to be normal.

Solution:
a.
1.
𝐻0 : 𝜇 = 46
𝐻1 : 𝜇 < 46
2. Calculate the test statistic value.
𝑥̅ − 𝜇 42 − 46
𝑡𝑐 = = = −𝟏. 𝟏𝟔
𝑠/√𝑛 11.9/√12

3. K.B
0.4

0.35

0.3

0.25

0.2 𝛼=0.05
0.15

0.1

0.05

0
-4 -3 -2 -1 0 1 2 3 4

−𝑡𝑇(𝛼,𝑛−1)
= −1.796

Decision: 𝑡𝑐 = −1.16 > −𝑡𝑇(0.05, 11) = −1.796

𝑯𝟎 can’t be rejected.
4. A new drug is being tried on 𝒏 = 𝟖 people with heart disease. Average of the blood pressure
of these patients are obtained as 𝒙 = 𝟏𝟏, 𝑺 = 𝟑. 𝟐𝟎𝟕 by the sample.

a.For %95 , obtain the confidence interval.

Çözüm:

𝑡𝑇(𝛼/2, 𝑛−1) = 𝑡𝑇(0.025,7) = 2.365


𝑠 𝑠
𝑃 (𝑥̅ − 𝑡𝑇(𝛼, 𝑛−1) √𝑛
≤ 𝜇 ≤ 𝑥̅ + 𝑡𝑇(𝛼/2, 𝑛−1) √𝑛) =1−𝛼 (1 − 𝛼)
2

3.207 3.207
𝑃 (11 − 2.365 ≤ 𝜇 ≤ 11 + 2.365 )= 1−𝛼 (1 − 𝛼)
√8 √8

𝝁: [𝟖. 𝟑𝟐, 𝟏𝟑. 𝟔𝟖]

b. A researcher claims that; the population mean 𝜇 is different from 12 . Test the hypothesis.

1.

𝐻0 : 𝜇 = 12
𝐻1 : 𝜇 ≠ 12

2.
𝑥̅ − 𝜇 11 − 12
𝑡𝑐 = = = −𝟏. 𝟏𝟑
𝑠/√𝑛 3.207/√8
3.

𝑡𝑇(𝛼/2, 𝑛−1) = 𝑡𝑇(0.025,7)


= 𝟐. 𝟑𝟔𝟓 𝛼/2 𝛼/2

−𝑡𝑇(𝛼,𝑛−1) 𝑡𝑇(𝛼,𝑛−1)
2 2
) )
𝑡𝑐 = −1.13 >
−𝑡𝑇(𝛼,𝑛−1) = −2.365 𝐻0
2

can’t be rejected. .

5. The lengths of units produced in a production process are controlled.Standard deviation


is as 𝝈 = 𝟎. 𝟒𝟓 mm . For 𝒏 = 𝟒𝟎, 𝒙 = 𝟑𝟓. 𝟔𝟐mm.
a. For 𝜶 = %𝟗𝟓 confidence level, obtain the confidence interval.
b. Obtain the confidence level lenght.
c. If the lenght is 0.30 what is 𝛼 =?
d. For 𝜶 = %𝟗𝟓 if the lenght is 0.1mm what is 𝑛 =?
e. For 𝜶 = %𝟗𝟓 obtain the one side interval.
f. Test the hypothesis 𝜇 < 40 .

Çözüm:

a.
𝑥 = 35.62, 𝜎 = 0.45 , 𝑛 = 40
1 − 𝛼 = 0.95 𝛼 = 0.05 ;
𝒁𝑻(𝟎.𝟎𝟐𝟓) = 𝟏. 𝟗𝟔

𝜎 𝜎
𝑃 (𝑥̅ − 𝑍𝑇(𝛼⁄2) ≤ 𝜇 ≤ 𝑥̅ + 𝑍𝑇(𝛼⁄2) ) = 0.95
√𝑛 √𝑛
0.45 0.45
𝑃 (35.62 − 1.96 ≤ 𝜇 ≤ 35.62 + 1.96 ) = 0.95
√40 √40
𝝁: [𝟑𝟓. 𝟒𝟖, 𝟑𝟓. 𝟕𝟔]

𝜎 𝜎 𝜎 0.45
(𝑥̅ + 𝑍𝑇(𝛼⁄2) ) − (𝑥̅ − 𝑍𝑇(𝛼⁄2) ) = 2𝑍𝑇(𝛼⁄2) = 2 ∗ 1.96 ∗ = 𝟎. 𝟐𝟖
√𝑛 √𝑛 √𝑛 √40

𝜎 0.45
b. 2𝑍𝑇(𝛼⁄2) = 0.30 → 2 ∗ 𝑍𝑇(𝛼⁄2) ∗ = 0.30
√𝑛 √40
𝑍𝑇(𝛼⁄2) = 2.1
0.4

0.35

0.3

1 − 𝛼/2
0.25

0.2

0.15
𝛼/2
0.1

0.05

0
-4 -3 -2 -1 0 1 2 3 4

𝑍𝑇(𝛼/2)
= 𝟐. 𝟏

𝛼
1− = 0.9821 → 𝜶 = 𝟎. 𝟎𝟑𝟓𝟖
2
𝜎
c. 2𝑍𝑇(𝛼⁄2) = 0.1 → 𝑛 =?
√𝑛
0.45
2 ∗ 1.96 ∗ = 0.1
√𝑛
𝒏 ≅ 𝟑𝟏𝟏

𝜎
𝑃 (𝜇 < 𝑥̅ + 𝑍𝑇(𝛼) ) = 0.95
√𝑛
𝜎
𝑃 (𝜇 > 𝑥̅ − 𝑍𝑇(𝛼) ) = 0.95
√𝑛

𝒁𝑻(𝟎.𝟎𝟓) = 𝟏. 𝟔𝟒𝟓
0.45
𝑃 (𝜇 < 35.62 + 1.645 ) = 0.95
√40
𝑷(𝝁 < 𝟑𝟓. 𝟕𝟑𝟕) = 𝟎. 𝟗𝟓

f.

1.

𝐻0 : 𝜇 = 40
𝐻1 : 𝜇 < 40
2.
𝑥̅ − 𝜇 35.62 − 40
𝑍𝑐 = = = −𝟔𝟏. 𝟓𝟓
𝜎/√𝑛 0.45/√40
0.4

0.35

0.3

0.25

0.2

0.15
𝛼
0.1

0.05

−𝑍𝑇(𝛼)
-4 -3 -2 -1 0 1 2 3 4

𝒁𝒄 < −𝒁𝑻(𝜶)= − 𝟏. 𝟔𝟒𝟓 𝐻0 is


rejected.

Special Case :
When; 𝑛 > 30 z random variable is used instead of 𝑡 random variable.

5.
It is claimed that the average durability of dental fillings made using a certain medicine is
different from 5 years. 𝒏 = 𝟒𝟏 of the dental fillings made using the relevant drug were randomly
selected. Sample mean and the standard deviation are obtained as 𝒙 = 𝟓. 𝟗, 𝑺 = 𝟏. 𝟕𝟒 . 𝛼 =
0.01 , test the hypothesis. Obtaib the confidence interval.

𝜎 2 is unknown, 𝑛 > 30, 𝑧 random variable is used.

1) 𝐻0 : 𝜇 = 5
𝐻1 : 𝜇 ≠ 5

𝑥̅ −𝜇 5.9−5
2) 𝑍𝑐 = 𝑠/ = 1.74/√41 = 3.33
√𝑛

3)

0.005
0.005
−𝑍𝑇(0.005) = −2.575 𝑍𝑇(0.005) = 2.575
𝑍𝑐 = 3.33 > 𝑍𝑇(𝛼⁄2=0.005) = 2.575 𝐻0 is rejected. Confidence interval;

𝑠 𝑠
𝑃 (𝑥̅ − 𝑍𝑇(𝛼⁄2) ≤ 𝜇 ≤ 𝑥̅ + 𝑍𝑇(𝛼⁄2) ) = 0.99
√ 𝑛 √𝑛
5.2003
𝑠 1.74
𝑥̅ ∓ 𝑍𝑇(𝛼⁄2) = 5.9 ∓ 2.575
√ 𝑛 √41
5.5997
𝜇: [5.2003, 5.5997]
EXAMPLES:

1.
In a research report, Richard H. Weindruch of the UCLA Medical School claims that mice with
an average life span of 32 months will live to be about 40 months old when 40% of the calories
in their diet are replaced by vitamins and protein. Is there any reason to believe that μ < 40 if
̅ = 𝟑𝟖
𝒏 = 𝟔𝟒 mice that are placed on this diet have an average life of 𝒙 months with a
standard deviation of ay 𝒔 = 𝟓. 𝟖 months? Obtain the confidence interval. 𝜶 = 𝟎. 𝟎𝟓

2. An electrical firm manufactures light bulbs that have a lifetime that is approximately
normally distributed with a mean of 800 hours and a standard deviation of 40 hours
𝑿~𝑵(𝝁 = 𝟖𝟎𝟎, 𝝈 = 𝟒𝟎)
Test the hypothesis that 𝐻0 : 𝜇 = 800 hours against the alternative, 𝑯𝟏 : 𝝁 ≠ 𝟖𝟎𝟎 hours, if a
random sample of 𝒏 = 𝟑𝟎 bulbs has an average life of 𝒙̅ = 𝟕𝟖𝟖 hours. Obtain the confidence
interval. 𝜶 = 𝟎. 𝟎𝟏
.

You might also like