Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Probability Models: Normal and Binomial Distributions, Lecture notes of Probability and Statistics

Instructions on how to use stata software to calculate probabilities based on normal and binomial distributions. It covers the normal model, finding areas under the normal curve, and the binomial model, calculating probabilities of successes in trials. Examples and exercises are included.

What you will learn

  • How do you find the proportion of the area under the normal curve that lies below a certain z-score using STATA?
  • What is the formula to find the z-score corresponding to a certain percentile in the normal distribution?
  • How do you calculate the probability of exactly k successes in n trials using the binomial distribution in STATA?

Typology: Lecture notes

2021/2022

Uploaded on 09/12/2022

jokerxxx
jokerxxx 🇺🇸

4.3

(36)

335 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Working with Probability Models
1. The Normal Model
We can use STATA to calculate similar values to those found in the Normal Table in the back of
the book. Suppose we want to find the proportion of the area under the normal curve that lies
below 1=z. To find this area we type
display normprob(1)
in the command window. This gives us the result .84134475, which you can verify coincides with
the value in the back of the book.
If, instead, we want to find the proportion of the area under the normal curve that lies above
1=z, we would need to type
display 1-normprob(1)
Suppose we want to know how many standard deviations above the mean we need to be in order
to lie in the 90th percentile of the normal curve. To find this value type
display invnorm(0.9)
Using this command, we find that that the corresponding z-value is equal to 1.2815516. In other
words, we need to be 1.28 standard deviations above the mean to be in the 90th percentile.
Ex. The height of U.S. men (in inches) approximately follows a normal model with mean 69.1
and standard deviation 2.9. Let X be the height of a randomly sampled man.
Suppose we want to estimate the probability that a man is between 5'6" and 6'. Then we can
simply type
display normprob((72-69.1)/2.9)-normprob((66-69.1)/2.9)
which gives us the result .69880214, or approximately 70% of all U.S. men are between 5'6" and
6'. Note that we, in this example, needed to insert the z-score into our calculations.
Suppose we want to know what is the shortest a man can be and still be in the top 10% of all U.S.
males. We can calculate this value by first finding how many standard deviations, z, above the
mean we need to be in order to be in the top 10%, and thereafter using the formula
µ
σ
+= z
x
to
find the proper value.
Doing these two tasks together we can write,
display invnorm(0.9)*2.9+69.1
This gives us the result 72.8165 inches.
pf3

Partial preview of the text

Download Probability Models: Normal and Binomial Distributions and more Lecture notes Probability and Statistics in PDF only on Docsity!

Working with Probability Models

1. The Normal Model We can use STATA to calculate similar values to those found in the Normal Table in the back of the book. Suppose we want to find the proportion of the area under the normal curve that lies below z = 1. To find this area we type display normprob(1) in the command window. This gives us the result .84134475, which you can verify coincides with the value in the back of the book. If, instead, we want to find the proportion of the area under the normal curve that lies above z = 1 , we would need to type display 1-normprob(1) Suppose we want to know how many standard deviations above the mean we need to be in order to lie in the 90 th^ percentile of the normal curve. To find this value type display invnorm(0.9) Using this command, we find that that the corresponding z-value is equal to 1.2815516. In otherwords, we need to be 1.28 standard deviations above the mean to be in the 90th (^) percentile.

Ex. The height of U.S. men (in inches) approximately follows a normal model with mean 69. and standard deviation 2.9. Let X be the height of a randomly sampled man. Suppose we want to estimate the probability that a man is between 5'6" and 6'. Then we can simply type display normprob((72-69.1)/2.9)-normprob((66-69.1)/2.9) which gives us the result .69880214, or approximately 70% of all U.S. men are between 5'6" and 6'. Note that we, in this example, needed to insert the z-score into our calculations. Suppose we want to know what is the shortest a man can be and still be in the top 10% of all U.S. males. We can calculate this value by first finding how many standard deviations, z, above the

mean we need to be in order to be in the top 10%, and thereafter using the formula x = z σ + μ to

find the proper value. Doing these two tasks together we can write, display invnorm(0.9)*2.9+69. This gives us the result 72.8165 inches.

Exercise 1: The height of U.S. men (in inches) approximately follows a normal model with mean 69.1 and standard deviation 2.9. Let X be the height of a randomly sampled man. (a) Find the probability that a man is shorter than 60 inches. (b)(c) Find the probability that a man is between 60 and 72 inches.What is the shortest a man can be and still be in the top 20% of all U.S. males?

2. The Binomial Model The STATA command Binomial(n,k,p) returns the probability of k or more successes in n trials when the probability of a success on a single trial is p. If X is B(n,p), we can calculate P ( Xk )using STATA by typing

display Binomial(n,k,p) in the command window where n, k, and p are specified by the problem. If we instead want to calculate P ( X = k )using STATA, we have to rewrite the equation as P ( X = k )= P ( Xk )− P ( Xk + 1 )(The probability of exactly k successes is equal to the probability of k or more successes minus the probability of k+1 or more successes). In STATA we can do this by typing display Binomial(n,k,p)-Binomial(n,k+1,p) in the command window where n, k, and p are specified by the problem.

Ex. The probability that a baby is born a girl is .488. Suppose that 10 babies are born in one day at a certain hospital. Let X = the number of girls. We can assume that X is bin(10, 0.488) Find the probability that 5 or more of the babies are girls. Here n=10 and p=0.488. We want tocalculate P ( X ≥ 5 ), so k=5.

We use the command display Binomial(10,5,.488) and find that the answer is .59318433. Now suppose we want to calculate the probability that less than 5 of the infants are girls. Here n=10 and p=0.488. We want to calculate P ( X < 5 )= 1 − P ( X ≥ 5 ). We use the command display 1-Binomial(10,5,.488)