P&S L1 C5 S1

Intro Stats: Islamic Approach -- Part 2 Prob & Stat

Lecture 1: Random Samples -- Concept 5: Law of Large Numbers

S1: Observed Sample Frequencies Converge to True Population Probabilities

The Graph shows how the Law of Large Numbers works. The True Probability is the proportion of PML-N Voters in the Target Population, which is 44.7%. We take simple random samples of size 50,100,150, and so on upto 1000. For the largest sample of 1000, the sample proportion is 45.1% which is very close to the true probability of 44.7%.

Target Population = 213,886 Voters in Islamabad II, seat NA-49.

PML-N Votes = 95,701 Other Votes = 118,185

For each random draw, the probabilty of choosing PML-N Voter is

p = 95,701/213,886 = 44.74%, Thus is the true probability of event E = Voter for PML-N in the Target Population. Now take a Simple Random Sample of size N from the Target Population. Let S be the number of voters for PML-N in the Simple Random Sample. Then S/N is the observed frequency of PML-N votes in the SRS. According to Law of Large Numbers, if N is large, then S/N should be close to 44.74%.

EXCEL DEMO, (see spreadsheet attached below)

Suppose we list the voters by serial numbers from 1 to 213886, and arrange the voters so that the PML-N voters are numbered from 1 to 95701, THEN

A simple random draw is RANDBETWEEN(1,213886) which chooses a serial number, identifying a single voter. To find out whether or not this voter is PML-N, we use the EXCEL statement:

IF(RANDBETWEEN(1,213886)<95701.5,1,0). If the serial number is less than 95701.5, then the voter is PML N, and the IF statement returns a 1, otherwise the voter is OTHER and the IF function produces 0. We copy this statement down from cell A1 to A1000 to create a Simple Random Sample of size 1000. Now, to get the SAMPLE PROPORTION, the number of PML-N voters in a sample of size N, we can use the following EXCEL statement:

AVERAGE(A1,A50) which will generate the average value of the first 50 cells.

AVERAGE(A1:A100) will generate the sample proportion for SRS size 100

AVERAGE(A1,A1000) will generate the average for the FULL SRS of 1000

Results are tabulated in the table displayed on the right, and plotted in the graph above.

Special EXCEL trick was used to produce the table. Instead of using AVERAGE(A1,A100), we listed the entries 50,100,150,200,...,1000 in cells D3 to D23/ Then we used AVERAGE($A$1:INDIRECT("A"&D3)). The INDIRECT function takes the"A" and attaches to it the 50 entry in cell D3, converting "A"&D3 to the cell reference A50. Now the average is taken from A1 to A50. This method prevents the need of writing out A50, A100, A150 all separately by hand.

NA-49 Islamabad II Detail Election Result 2013 — Detailed Elections results for NA-49