# Ch 3.4 Sampling With/Without Replacement

- Page ID
- 15893

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\id}{\mathrm{id}}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\kernel}{\mathrm{null}\,}\)

\( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\)

\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\)

\( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)

\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)

\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vectorC}[1]{\textbf{#1}} \)

\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)## Ch 3.4 Sampling w/wo replacement

Sampling with replacement – selected subjects are put back into the population before another subject are sampled. Subject can possibly be selected more than once.

Sampling without replacement – Selected subjects will not be in the “pool” for selection. All selected subjects are unique. This is the default assumption for statistical sampling.

**Compound events involving multiple trials/steps**

When events involve multiple steps, they are called compound events A, and then B, the compound event is also called A and B.

But P(A and then B) is not P( A and B) where A and B outcome of one step with 2 categories.

**Multiplication rule for two events in two steps:**

A and B : Event A occurs in one trial and Event B occurs in another trial.

P(A and B) = P(A) × P(B after A has occurred)

P(A and B) = P(A) × P(B |A)

**Independent/Dependent events**

1**) Dependent:** occurrence of one event affect the next event.

P(A and B) = P(A) × P(B| A)

2) **Independent:** occurrence of one event does not affect the other.

P(A and B) = P(A) x P(B)

In general : P(A and B and C …) = P( A) x P(B) x P(C) … if A, B , C are independent.

Ex1. A fair coin is tossed 5 times. Find P(first 3 tosses are heads) . F( first 4 are heads), P(at least one head in 4 tosses).

Coin tosses are __independent__ events.

a) P(First 3 tosses are heads) =

Since tosses are independent, P( 3 heads) = 0.5^{3 }= 0.125

b) P( First 4 tosses are heads) =

Since tosses are independent, P( 4 heads) = 0.5^{4} = 0.0625

P(at least one head in 4 tosses) = 1 – P(all 4 heads are tails) = 1 - 0.5^{4} = 0.9375

Ex2. In a group of 300 all adults, 272 are right-handed, 3 adults are selected __with replacement__.

Find P( all 3 are right- handed ) and P(all 3 left-handed).

Ans:

P(one right-handed) = 272/300 =0.907

P(one left-handed) = (300-272)/300 = 28/300 = 0.093

P(3 right-handed) = (272/300) (272/300)(272/300) = (272/300)^{3} = 0.745

P( 3 left-handed) = (28/300)(28/300)(28/300) = (28/300)^{3} = 0.0008

P(At least one right-handed) = 1 – P(All 3 left-handed) = 1 - 0.0008 = 0.9992

Ex3. In a jar with 5 red, 6 blue and 2 white marbles. Two marbles are selected, find the probability that both are red if:

a) If two marbles are selected with replacement.

b) If two marbles are selected without replacement.

Ans:

a) If marbles are replaced, the events are independent.

P( both are red) = 5/13 * 5/13 = 0.1479

b) If two marbles are selected without replacement, the events are dependent,

P(both are red) = 5/13 * 4/12 = 1282

**Sampling and independent event**

Sampling with replacement – independent events

Sampling without replacement – dependent events

Treating Sampling without replacement as independent if one of the following are satisfied:

a) Assume a very big population when population size is not given. Only P(A) is given.

b)** Use 5% guideline** for cumbersome calculations:

When sampling without replacement and the sample size is no more than 5% of the size of population, treat sampling as independent. (Even though they are actually dependent.)

Ex1. Assume that 10% of adults in the United states are left handed. Find the probability that three selected adults all are left handed.

Since the population size is not given only P(L) = 0.1 is given, we can treat sampling without replacement as independent.

P(L and L and L) = P(L) × P(L) × P(L) = 0.1 × 0.1 × 0.1

= 0.001

Ex2. In batch of 6400 light bulbs, 80 are defective.

If 12 light bulbs are selected from the batch without replacements, find probability that all are good.

Ans:

sample size = 12, population size = 6400

Since sampling proportion = 12/6400 = 0.00188 < 0.05

we can treat the sampling as independent by apply 5% guideline for cumbersome calculation.

P (one good) = (6400-80)/6400 = 0.9875

P (one defective) = 80/6400 = 0.0125

P( all 12 are good) = 0.9875^{12} = 0.860

P (at least one defective) = 1 – P(all 12 are good) = 0.14

**Rare Event Rule**

If, under a given assumption, the probability of a particular observed event is very small and the observed event occurs significantly less than or greater than what we typically expect with that assumption, we conclude the assumption is not correct.

P( A ) ≤ 0.05, then A is unlikely to occur by chance.

Use Probability to form Conclusion:

If P(A) > 0.05, A can occurs by chance, so there is __not sufficient evidence __to conclude that “the change” is effective.

If P(A) ≤ 0.05, A **cannot** have occurred by chance, so there is __sufficient evidence__ to conclude that “the change” is effective.

Ex1. A study is done to test if vitamin C intake will reduce common cold. 6 out of 56 subject taking vitamin C catch the common cold compare to 8 out of 56 subjects not taking vitamin C. If vitamin C has no effect, there is a 0.32 chance of getting such sample result. What can we conclude?

Ans: Since probability 0.32 is not unlikely, the result could have occurred by chance rather than due to vitamin C treatment. There is not sufficient evidence to conclude vitamin C is effective.