Probability and Statistics - Practice Tests and Solutions
Probability and Statistics - Practice Tests and Solutions
Statistics -
Practice Tests
and Solutions
1. Probability
Definition:
Classic Model Relative Frequency of Occurrence
Probability
Mutually Exclusive Events: When
Rule of Addition two events cannot occur at the
same time P(A ∩ B) = 0
The probability that Event A or Event B
occurs
P(A) P(B)
=
Probability that Event A occurs A B
+
Probability that Event B occurs Independent Events: The
- occurrence of Event A does not
Probability that both Events A and B occur change the probability of Event B
P(A ∩ B) = P(A) P(B|A)
P(A ∪ B) = P(A) + P(B) - P(A ∩ B)
Probability
Venn Diagram
❖ Union: Probability that events A ❖ Intersection: Probability that
or B occur: P(A ∪ B) events A and B occur: P(A ∩ B)
A B A B
Probability
With repetition Without repetition
❖ Permutation: r 𝑛!
n 𝑛𝑃𝑟 =
𝑛−𝑟 !
Order is important.
❖ Combination: (𝑟 + 𝑛 − 1)!
𝑛𝑪 𝑟 =
𝑛!
𝑟! 𝑛 − 1 ! 𝑛 − 𝑟 ! r!
Order is NOT important.
Probability Slide 7
2. Descriptive
Statistics
Data
❖ Continuous Data
❖ Measurements: Length, height,
time
Qualitative Data Quantitative Data
❖ Discrete Data
❖ Count: Number of students,
Description Numbers Number of heads
Data
Slide 9
Population: Sampling
Complete Process Sample: Part
collection to of population
be studied
SAMPLING
Slide 10
Mean Standard Deviation
σ𝑥
𝜇=
𝑁
Median 𝜎=
σ 𝑥−𝜇
𝑁
2
𝑠=
σ 𝑥 − 𝑥ҧ
𝑛−1
2
Descriptive Statistics
Slide 11
Highest Value
Q3 – Third Quartile
Q2 – Median
Q1 – First Quartile
Lowest Value
BINOMIAL DISTRIBUTION
Slide 14
❖ The mean of the distribution
(μx) is
n.p
❖ The variance (σ2x) is
n.p.(1-p)
❖ The standard deviation (σx) is
𝐧⋅𝐩⋅ 𝟏−𝐩
BINOMIAL DISTRIBUTION
Slide 15
3B Poisson
Distribution
A Poisson experiment has the following μx
properties: P x, μ = e−μ ⋅
x!
❖ The experiment results in outcomes that
can be classified as successes or failures. • e: A constant equal to approximately
❖ The average number of successes (μ) that 2.71828. (Actually, e is the base of the
occurs in a specified region is known. natural logarithm system)
❖ Outcomes are random. Occurrence of one • μ: The mean number of successes that
outcome does not influence the chance of occur in a specified region.
another outcome of interest. • x: The actual number of successes that
❖ The outcomes of interest are rare relative occur in a specified region.
to the possible outcomes. • P(x; μ): The Poisson probability that
❖ Example: Road accidents, que at the exactly x successes occur in a Poisson
counter experiment, when the mean number of
successes is μ.
POISSON DISTRIBUTION
Slide 17
• The Poisson distribution has the following
properties:
• The mean of the distribution is equal to μ .
• The variance is also equal to μ .
BINOMIAL DISTRIBUTION
Slide 18
3C Normal
Distribution
𝑥−𝜇 2
−
ⅇ 2𝜎2
𝑃 𝑥 =
𝜎 2𝜋
NORMAL DISTRIBUTION
Slide 20
• About 68% of the area under the
curve falls within 1 standard
deviation of the mean.
NORMAL DISTRIBUTION
Slide 21
Z Value / Standard Score
❖ z is the z-score,
❖ x is the value of the element,
❖ μ is the population mean,
❖ σ is the standard deviation.
NORMAL DISTRIBUTION
Slide 22
Binomial Distribution approximated
to the Normal Distribution
NORMAL DISTRIBUTION
Slide 23
3D t-Distribution
𝑥ҧ − 𝜇
𝑡=
𝑠Τ 𝑛
❖ s is the sample standard deviation
❖ 𝑥ҧ is the sample mean
❖ n is the number of samples
❖ 𝜇 is the population mean
Reference: Wikipedia
t - DISTRIBUTION
Slide 25
4 Hypothesis Testing
Basics
❖ For almost all populations, ❖ If a variable has a mean of µ and
the sampling distribution the variance 𝜎 2 , as the sample
of the mean can be size n increases, the sample
approximated closely by a mean approaches a normal
normal distribution, distribution with mean 𝜇𝑥ҧ and
provided the sample size variance 𝜎𝒙ഥ𝟐
is sufficiently large. 𝟐 𝜎𝒙𝟐
𝜇𝑥ҧ = 𝜇 𝜎𝒙ഥ =
𝒏
The standard deviation of the
𝜎𝑥
sampling distribution of the mean 𝜎𝑥ҧ =
is called the standard error of the
mean. 𝑛
CONFIDENCE INTERVAL
Slide 28
𝑧𝛼Τ2 ⋅ 𝜎
𝐶𝐼 = 𝑥ҧ ± 𝑝Ƹ 1 − 𝑝Ƹ
𝑛 𝐶𝐼 = 𝑝Ƹ ± 𝑧𝛼Τ2
𝑛
❖ Zα/2 = z table value for confidence
level, Zα/2 = z table value for confidence level
❖ σ = standard deviation pො = sample proportion
❖ n = sample size. n = sample size
CONFIDENCE INTERVAL
Slide 29
TIPS
❖ Start with the Alternate Hypothesis.
❖ Null Hypothesis: The person is innocent This is what you want to prove.
❖ Alternate Hypothesis: The person is ❖ Null Hypothesis will always have the
guilty. You need to provide proof of this. equal to sign (=, ≥, ≤)and Alternate
❖ In statistical terms you: Hypothesis will never have it.
❖ Reject the Null Hypothesis, or
❖ Fail to reject the Null Hypothesis (not accept H0 Ha
the Null Hypothesis) not equal (≠)
equal (=)
H0 Ha
not equal (≠)
equal (=)
P - VALUE
Slide 33
5 Hypothesis Tests
One Sample z Test
Two Variances
More than
ANOVA
2 samples
Hypothesis Tests
Slide 35
1. State the Alternate Hypothesis.
2. State the Null Hypothesis.
3. Select a probability of error level
(alpha level). Generally 0.05
4. Calculate the test statistic (e.g t
or z score)
5. Critical test statistic
6. Interpret the results.
𝑝ො − 𝑝 2
𝑧= 2
𝑛 − 1 𝑠
𝑝 1−𝑝 χ =
𝜎2
𝑛
One Proportion Test One Variance Test
𝑝1
μ 𝑥ҧ 𝑝Ƹ1
𝜎 s
𝑝 𝑝Ƹ
𝑧=
𝑝 − 𝑝0 Two Proportions Tests
𝑝0 1 − 𝑝0
𝑛 Test for no difference between proportions
H0: p1 - p2 = 0 Yes No H0: p1 - p2 = d
Ha: p1 - p2 ≠ 0 Pooled Un-pooled Ha: p1 - p2 ≠ d
𝑛1 𝑝Ƹ1 + 𝑛2 𝑝Ƹ 2
𝑝ҧ =
𝑛1 + 𝑛2
𝑝Ƹ1 − 𝑝Ƹ 2 − (p1 − p2)
𝑧𝑐𝑎𝑙 =
𝑝Ƹ1 − 𝑝Ƹ 2 𝑝Ƹ1 1 − 𝑝Ƹ1 𝑝Ƹ 1 − 𝑝Ƹ 2
𝑧𝑐𝑎𝑙 = + 2
𝑛1 𝑛2
1 1
𝑝ҧ 1 − 𝑝ҧ +
𝑛1 𝑛2
❖ Chi-square test
❖ For testing the population variance against a specified value
❖ testing goodness of fit of some probability distribution
❖ testing for independence of two attributes (Contingency Tables)
❖ F-test
❖ for testing equality of two variances from different populations
❖ for testing equality of several means with technique of ANOVA.
ANOVA Slide 44
Goodness-of-Fit Test
H0: The data follow a specified
distribution.
𝑘
O−𝐸 2
χ =
2
𝐸
𝑖=1
𝑘
O−𝐸 2
χ =
2
𝐸
𝑖=1