Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Calculating variance / std deviation

  • 03-12-2013 11:06pm
    #1
    Registered Users, Registered Users 2 Posts: 3,187 ✭✭✭


    Hi

    Working on this question:

    In a sample of 200 registered voters, 108 plan to vote for candidate A. Construct a 95% confidence interval for the proportion of voters that plan to vote for Candidate A.

    Two questions on this:
    1) Do I use (p)(q) = (108/200)(92/200) to calculate variance & std dev? Or should I use (n)(p)(q)??
    2) Is this result considered "S" or "Sigma" squared? i.e. do I subsequently calculate the Z-statistic or the t-statistic?

    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 5,141 ✭✭✭Yakuza


    http://en.wikipedia.org/wiki/Binomial_distribution#Normal_approximation

    B(n,p)~ N(np,npq) (Variance is npq), standard dev is [latex]\sqrt{npq}[/latex]

    Your interval is 1.96 standard devs either side of the mean.


  • Registered Users, Registered Users 2 Posts: 3,187 ✭✭✭MacDanger


    Good stuff, thanks Yakuza


  • Registered Users, Registered Users 2 Posts: 3,187 ✭✭✭MacDanger


    Hi

    Are you sure about that? When I calculate it out, the result doesn't make any sense. Or am I making a mistake somewhere??

    95% CI for the proportion of voters voting for candidate A:

    Z97.5 = 1.96; n = 200; p = 0.54; q = 0.46
    μ = p = 0.54;
    σ2 = (n)(p)(q) = (200)(0.54)(0.46) = 49.68; σ = 7.048

    CI = μ ± (Z97.5)(σ/√n)
    = 0.54 ± (1.96)(7.048√200) = 0.54 ± 0.977 = [-0.437, 1.517]

    A negative value and a value > 1 for proportion of voters makes no sense?

    Calculating using σ2 = (p)(q) = (0.54)(0.46) = 0.2484; σ = 0.4984
    Gives:
    CI = μ ± (Z97.5)(σ/√n)
    = 0.54 ± (1.96)(0.4984/√200) = 0.54 ± 0.069 = [0.471, 0.609]

    Which appears to be a reasonable CI although perhaps tighter than I would have expected.

    Any help appreciated :-)


  • Registered Users, Registered Users 2 Posts: 5,141 ✭✭✭Yakuza


    μ isn't 0.54, it's np, or 108.
    I'd have given 108 ± 1.96 * 7.048 as the CI for the number of voters, or roughly [94.185,121.815].
    The question actually asks for the proportion so you need to divide the above by 200, yielding [0.471,0.609].

    We both got there in the end :)


  • Registered Users, Registered Users 2 Posts: 3,187 ✭✭✭MacDanger


    Good man, thanks for clarifying that for me :-)


  • Advertisement
Advertisement