Weighted lottery A charter school assigns seats by conducting a lottery.  In the past, each child was given a number, and balls were selected randomly.  This year, they are starting a new policy of giving low-income students 3 balls, and other kids 2 balls.  
They have 10 seats to assign, and 31 applications.  I don't know how many students are low-income, but let's assume 12.
How is the number of low-income students likely to be changed by the new policy?  Is there a way to create a formula where I could plug in the number of low-income students and see the probability distribution?
 A: As whuber remarks below, this is only an approximate answer
Let 


*

*$n_{low}$ be Number of kids applying

*$n_{high}$ be Number of low income kids applying

*$n_{all}$ be Number of high income kids applying

*$b_{all}$ be Number of kids applying

*$P_{low}$ be Probability of an individual low income kids receiving a seat

*$E_{low}$ be Expected number of low income kids receiving a seat


Then 


*

*$b_{all} = 3 . n_{low} + 2 . n_{high} = n_{low} + 2 . n_{all}$

*$P_{low} = 3 / b_{all}$

*$E_{low} = n_{low}.P_{low} = n_{low} . 3 / b_{all} = \frac{3 . n_{low}}{n_{low} + 2 . n_{all}}$


So if $n_{low} = 12$, then $E_{low} = \frac{3 . 12}{12 + 2 . 31} = \frac{36}{74} = 48.65\%$
A: Computer simulation in SAS
Attention, I suspect my answer is wrong, because the average deviates from the theoretical one calculated by wubher and verified by me.
1000 trials to fill a class of 10 students from 31 applicants from which 12 are low income gave me an average of 4.067 low income students in the class. (minimum 1, p25 3, p75 5, maximum 8

The code is
%macro simulate(nAll,nLow,nClass,nTrials);
    data scores;
        format lowEnrolled 8.;
        stop;
    run;

    %do trial = 1 %to &nTrials;
        proc datasets noprint;
            delete class;
        run;

        data bucket;
            do applicant = 1 to &nAll;
                if (applicant le &nLow) then income = 'low ';
                else income = 'high';

                output;
                output;
                if applicant le &nLow then output;
            end;
        run;

        %do student = 1 %to &nClass;
            data enrollment;
                set bucket nobs=nBalls;
                retain take;
                if _N_ eq 1 then take = ceil(rand('uniform', 0, nBalls));
                if _N_ eq take then do;
                    call symput('enroll', applicant);
                    output;
                end;
            run;

            proc append data=enrollment base=class;
            run; 

            proc sql;
                delete * from bucket where applicant = &enroll;
            quit;
        %end;

        proc sql;
            insert into scores
            select count(*) as lowEnrolled from class where income = 'low ';
        quit;
    %end;

    proc sgplot data=scores;
        histogram lowEnrolled;
    run;

    proc means data=scores min p25 mean median p75 max;
        var lowEnrolled;
    run;
%mend;

%simulate(31,12,10,100);

A: This is a SAS version of the answer of whuber.
I created it because my whubers answer contradicted my simulation.
As this program gives the same results as whuber's I now suspect my simmulation.
To be proceeded.
%macro enrole (n, m, p, q);
    data take0;
        &setLabels;
        * you have a 100% chance of starting with no students of both income groups *;
        i = 0; 
        j = 0;
        f = 1;
    run;

    %do draw = 1 %to &n + &m;
        data take&draw.(drop=old_: lag_: f_p f_q);
            label 
                i = 'low income studens enrolled'
                j = 'high income studens enrolled'
                f = 'probability this happens'
                ;
            set take%eval(&draw.-1) (rename=(i=old_i j=old_j f=old_f)) end=last;

            f_p = old_f * (&n. - old_i) * &p. / ((&n. - old_i) * &p. + (&m. - old_j) * &q.);
            f_q = old_f * (&m. - old_j) * &q. / ((&n. - old_i) * &p. + (&m. - old_j) * &q.);
            label 
                f_p = 'probability of electing a low income student'
                f_q = 'probability of electing a high income student'
                ;
            if _N_ = 1 and f_p > 0 then do;
                i = old_i + 1;
                j = old_j;
                f = f_p;
                output;
            end;
            else do;
                f = f_p + lag_f_q;
                if f > 0 then do;
                    i = old_i + 1;
                    j = old_j;
                    output;
                end;
            end;
            if last and f_q > 0 then do;
                i = old_i;
                j = old_j + 1;
                f = f_q;
                output;
            end;

            lag_f_q = f_q;
            retain lag_:;
        run;
    %end;

    data take_all;
        set 
            %do draw = 1 %to &n + &m;
                 take&draw.
            %end;
            ;   
        class = i + j;
    run;

    proc print data= take_all;
    run;

    proc means data= take_all min p25 mean p75 max;
        by class;
        var i;
        weight f;
    run;
%mend;

%enrole (n = 12, m = 19, p = 3, q = 2);

