In-Class Exercise 7
Shih Chien University
2026-09-16
A bookstore records the number of textbooks bought per customer.
Is It a Probability Distribution?
Check the two requirements of a discrete probability distribution in R.
sum().Report whether p is a valid probability distribution.
Mean, Variance, and Standard Deviation
For the distribution above, compute in R:
\mu=\sum x\cdot P(x),\qquad \sigma^2=\sum x^2\cdot P(x)-\mu^2,\qquad \sigma=\sqrt{\sigma^2}
Round each answer to two decimal places with round(), and interpret \mu in one sentence.
Expectation
A charity sells 1,000 raffle tickets at NT$100 each. There is one first prize of NT$30,000 and two second prizes of NT$10,000.
Elementary Statistics: A Step by Step Approach