how taking multiple tests increases chance of detection of illness if you have it? I thought of this as I'm reading about covid tests accuracy, and I am thinking how taking multiple tests influences the chance of correctly detecting illness/no illness. So, if I understand this concepts correctly, I want to see how specificity and sensitivity change (and I assume they increase) when taking two tests.
I'm going to denote testing positive with + and having the illness as I, not having as NI. I'm going to limit the question to seeing one positive test result vs seeing two.
So let's say P(I|+)=0.8 and I want to first calculate P(I|++). From Bayes theorem:

Then since P(++)=P(+)*P(+) as events are independent, I have

and now I'm not sure where to take it, and how Bayes theorem was even useful. It seems I am missing something. I think I also need the prevalence of the disease in the general population to compute this, that is, P(I).
 A: Given that you're assuming the two tests are the same and independent Bayes formula becomes

As you thought, you'll need an estimate for P(I), which I'm sure there are a number of estimates floating around for COVID.
A: The first two comments under the original post make important points: "whatever may have cause an error in the first test result may also cause an error in the second" and "the analysis is gonna look ugly where you do not define a single type of infected but also have a nuisance parameter that varies among the different infected (and non-infected) which will describe the success probability of the test."  These sorts of (realistic) considerations will complicate matters and will break the conditional independence assumption that would make answering the question straightforward.
Consider the following semi-realistic example:

*

*$S \in \left\{\text{infected}, \text{not}\right\}$ is the (unobserved) state we care about, which is whether or not the person is infected

*$A \in \left\{0, 1, 2\right\}$ is the amount of virus/antigen in the person's body (think of the values as zero, medium or high)

*$X_i \in \left\{0, 1\right\}$ is the result of test $i$ (negative or positive)

For simplicity, suppose both tests are taken around the same time, so that we don't need to subscript $S$ or $A$ with a time index.
Suppose the DAG for the random variables $S, A, X_1, X_2$ looks like this:

i.e. $S \rightarrow A, A \rightarrow X_1, A \rightarrow X_2$.
Note that
\begin{equation*}
\newcommand{\CI}{\mathrel{\perp\mspace{-10mu}\perp}}
X_1 \CI X_2 \,\vert\,A
\end{equation*}
but the conditional independence does not hold if we condition on $S$ instead of $A$.
All you need to do in order to simulate this model is specify $\Pr[S]$, $\Pr[A \,|\, S]$, and $\Pr[X_i \,|\, A]$.
Here's a simulation in R.  It does get messy fast!
set.seed(12345)

pr_infected <- 0.01

pr_positive_given_A_high <- 0.98
pr_positive_given_A_medium <- 0.50
pr_positive_given_A_zero <- 0.05

n_obs <- 500000

df <- data.frame(S=sample(c("infected", "not"), size=n_obs, replace=TRUE, prob=c(pr_infected, 1 - pr_infected)))

## A is equally like to be medium or high given that someone is infected
## If they are _not_ infected, A is zero (with probability one)
df$A <- ifelse(df$S == "infected", sample(c(1, 2), size=n_obs, replace=TRUE), 0)

## Joint distribution of S and A
table(df$S, df$A)

simulate_test <- function(a) {
    stopifnot(a %in% c(0, 1, 2))
    if(a == 2) {
        ## When A is high, the test if very likely positive
        return(sample(c(0, 1), size=1, prob=c(1 - pr_positive_given_A_high, pr_positive_given_A_high)))
    }
    if(a == 1) {
        return(sample(c(0, 1), size=1, prob=c(1 - pr_positive_given_A_medium, pr_positive_given_A_medium)))
    }
    return(sample(c(0, 1), size=1, prob=c(1 - pr_positive_given_A_zero, pr_positive_given_A_zero)))
}

df$X1 <- sapply(df$A, simulate_test)
df$X2 <- sapply(df$A, simulate_test)

table(df$S, df$X1)
table(df$S, df$X2)

## What is the probability that someone's first test is positive, given that they are infected?
## This should be approx 0.5 * (pr_positive_given_A_high + pr_positive_given_A_medium)
pr_positive_given_infected <- 0.5 * (pr_positive_given_A_high + pr_positive_given_A_medium)
with(subset(df, S == "infected"), mean(X1 == 1))

## This is larger than pr_positive_given_infected^2
## because X1 and X2 are _not_ conditionally independent given S
with(subset(df, S == "infected"), mean(X1 == 1 & X2 == 1))

with(subset(df, X1 == 1 & X2 == 1), table(S))

## What is the probability that someone is infected given that both tests were positive?
## This should be approx
## pr_infected * (1/2) * (pr_positive_given_A_high^2 + pr_positive_given_A_medium^2) / (pr_infected * (1/2) * (pr_positive_given_A_high^2 + pr_positive_given_A_medium^2) + ((1 - pr_infected) * pr_positive_given_A_zero^2))
with(subset(df, X1 == 1 & X2 == 1), mean(S == "infected"))

## What is the probability that someone is infected given that _exactly one_ of their two tests was positive?
with(subset(df, X1 + X2 == 1), mean(S == "infected"))

with(subset(df, X1 == 1), mean(S == "infected"))
mean(df$S == "infected")

## If we assumed conditional independence, the probability that someone is infected given that both tests were positive would be
pr_infected * pr_positive_given_infected^2 / (pr_infected * pr_positive_given_infected^2 + (1 - pr_infected) * pr_positive_given_A_zero^2)
## which should differ slightly from
with(subset(df, X1 == 1 & X2 == 1), mean(S == "infected"))

