7. We can often approximate discrete probability distributions with other distri
ID: 3366545 • Letter: 7
Question
7. We can often approximate discrete probability distributions with other distributions. Although I've mentioned in class when these approximations are appropriate, you will find out yourselves in this question:) Note: when reporting these probabilities, you should include at least 2 decimal places. (a) The hypergeometric distribution can be approximated with the binomial distribution in certain situations. Fill in the following table with the correct probabilities. You can assume n 4 and p -N for all. Include R code for the highlighted cells (you can include more R output, if you wish, but make sure to indicate which pieces of your code generated the specified cells). In what situations (i.e. what values of p, N, and n) does the binomial approximate the hypergeometric distribution well? (you should use your results from the table in your answer, you won't receive points for just repeating what was said in class) Hypergeometric N -50 Binomia N-10 N 1000 0 4Explanation / Answer
a) N = 10
To calculate for hypergeometric with p = 0.6
N = 10, n = 4, K = 6, k = (0, 1, 2, 3, 4) using R
where N = population, K = number of succes in population, n = number of draw, k = number of success in sample
The commands are
dhyper(k, K, N-K, n, log = FALSE)
dhyper(0, 6, 4, 4, log = FALSE)
dhyper(1, 6, 4, 4, log = FALSE)
dhyper(2, 6, 4, 4, log = FALSE)
dhyper(3, 6, 4, 4, log = FALSE)
dhyper(4, 6, 4, 4, log = FALSE)
The results are,
To calculate for hypergeometric with p = 0.1
The commands are
dhyper(0, 1, 9, 4, log = FALSE)
dhyper(1, 1, 9, 4, log = FALSE)
dhyper(2, 1, 9, 4, log = FALSE)
dhyper(3, 1, 9, 4, log = FALSE)
dhyper(4, 1, 9, 4, log = FALSE)
The results are,
b) N = 50
To calculate for hypergeometric with p = 0.6
N = 50, n = 4, K = 30, k = (0, 1, 2, 3, 4) using R
The commands are
dhyper(k, K, N-K, n, log = FALSE)
dhyper(0, 30, 20, 4, log = FALSE)
dhyper(1, 30, 20, 4, log = FALSE)
dhyper(2, 30, 20, 4, log = FALSE)
dhyper(3, 30, 20, 4, log = FALSE)
dhyper(4, 30, 20, 4, log = FALSE)
The results are,
To calculate for hypergeometric with p = 0.1
The commands are
dhyper(0, 10, 40, 4, log = FALSE)
dhyper(1, 10, 40, 4, log = FALSE)
dhyper(2, 10, 40, 4, log = FALSE)
dhyper(3, 10, 40, 4, log = FALSE)
dhyper(4, 10, 40, 4, log = FALSE)
The results are,
c) N = 1000
To calculate for hypergeometric with p = 0.6
N = 1000, n = 4, K = 600, k = (0, 1, 2, 3, 4) using R
The commands are
dhyper(k, K, N-K, n, log = FALSE)
dhyper(0, 600, 400, 4, log = FALSE)
dhyper(1, 600, 400, 4, log = FALSE)
dhyper(2, 600, 400, 4, log = FALSE)
dhyper(3, 600, 400, 4, log = FALSE)
dhyper(4, 600, 400, 4, log = FALSE)
The results are,
To calculate for hypergeometric with p = 0.1
The commands are
dhyper(0, 100, 900, 4, log = FALSE)
dhyper(1, 100, 900, 4, log = FALSE)
dhyper(2, 100, 900, 4, log = FALSE)
dhyper(3, 100, 900, 4, log = FALSE)
dhyper(4, 100, 900, 4, log = FALSE)
The results are,
The binomial distribution for p = 0.6 and k = (0,1,2,3,4) using the R command
The commands are,
dbinom(0, 4, 0.6, log = FALSE)
dbinom(1, 4, 0.6, log = FALSE)
dbinom(2, 4, 0.6, log = FALSE)
dbinom(3, 4, 0.6, log = FALSE)
dbinom(4, 4, 0.6, log = FALSE)
The results are
For p = 0.1
The commands are
dbinom(0, 4, 0.1, log = FALSE)
dbinom(1, 4, 0.1, log = FALSE)
dbinom(2, 4, 0.1, log = FALSE)
dbinom(3, 4, 0.1, log = FALSE)
dbinom(4, 4, 0.1, log = FALSE)
The results are
The table complete table is,
From the table as the sample size increases the hypergeometric distribution goes more close to binomial distribution
N=10 N=50 N=1000 y p=0.6 p=0.1 p=0.6 p=0.1 p=0.6 p=0.1 p=0.6 p=0.1 0 0.004762 0.6 0.021038 0.39683 0.02537 0.655662 0.0256 0.6561 1 0.114286 0.4 0.148502 0.429006 0.153368 0.29238 0.1536 0.2916 2 0.428571 0 0.35888 0.15241 0.346235 0.04835 0.3456 0.0486 3 0.380952 0 0.352584 0.020842 0.345946 0.003514 0.3456 0.0036 4 0.071429 0 0.118997 0.000912 0.129081 4.68E-06 0.1296 0.0001Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.