Of a deck of 2000 cards, how many review sessions of 50 random cards must be made until 95% of cards are reviewed? I'm working on reviewing my notes through 2000 flashcards, I figure that if I review 50 cards, twice a day for a month this would be sufficient to get almost all cards?
Is there some sort of equation to determine how many times I will need to have a review session?
Thank you!
 A: This can be computed explicitly using a homogeneous Markov chain. The transition matrix from going of a collection of $i$ cards to a collection of $j$ cards is defined by
$$
p_{i,j}=\frac{\binom{N-i}{j-i}\binom{i}{n_0-j+i}}{\binom{N}{n_0}}
$$
where $N$ is the total number of cards and $n_0$ is the amount of cards that you view in a session (I'm assuming here that all cards seen in a session are different). Then for $N=2000$ and $n_0=50$ I get

By example, after $101$ study sessions the probability that the shown cards are above $1819$ ($\approx 91\%$ of all cards) is more than $95\%$. And the first time that the $5$-percentile is greater than the $95\%$ of total cards (i.e. greater than $1900$) happens in the $125$-th session.
The Julia code used to plot the above is this
using Distributions, SparseArrays, GLMakie

# This function defines our transition matrix:
function tm(N::Int, n0::Int)
    [pdf(Hypergeometric(N-l,l,n0),k-l) for l in 0:N, k in 0:N]
end

# This computes the 5-percentile of a probability vector
function percentile5(M::AbstractVector)
    s=0
    i=0
    while s <= 0.05
        i += 1
        s += M[i]
    end
    return i-1
end

# This function compute a matrix with three rows: means, 5-percentiles 
# and standard deviations. Each column represent a session.
function stats(N::Int, n0::Int, m::Int)    
    A = transpose(sparse(tm(N,n0)))
    sup = 0:N # The support of each distribution
    sup2 = sup .^2
    C = A[:,1]
    stats = zeros(3,m)
    for i in 1:m
        stats[1,i] = sum(C .* sup)
        stats[2,i] = percentile5(C)
        stats[3,i] = sqrt(sum(C .* sup2) - stats[1,i]^2)
        C = A * C
    end
    return stats
end

data = stats(2000,50,200)

fig = Figure()
ax1 = Axis(fig[1, 1],xlabel = "Number of sessions", ylabel="Shown cards")
ax2 = Axis(fig[2, 1],xlabel = "Number of sessions")
x = 1:200

lines!(ax1,x,data[1,:], color = :blue, label = "Average number of shown cards")
lines!(ax1,x,data[2,:], color = :red, label = "5-percentile of shown cards")
lines!(ax2,x,data[3,:], color = :green, label = "Standard deviation of shown cards")
axislegend(ax1, position = :rb)
axislegend(ax2, position = :rb)
fig

UPDATE: I updated the code with an insanely faster version.
