Bubble Sort with "while" loop - why is average case n^2? If Bubble Sort is written as:

    while True:
        False
        for i in (0 to n - 2):
            if list[i] &gt; list[i + 1]:
                swap.(list[i], list[i + 1])
                True
    return list


(where n is len(list))

Seems to me that in the worst case (a list in descending order):


the while loop runs $n$ times
the for loop runs $n - 1$ times per while loop $∴$ there will be $n^2 - n$ comparisons
the list is in decreasing order so there will ultimately be $(n^2 - n)/2$ swaps
$∴$ worst case is $O(n^2)$


In the best case (a list already sorted):


the while loop runs $1$ time
there will be $n - 1$ comparisons
the list is already sorted so there will ultimately be $0$ swaps
$∴$ best case is $\Omega(n)$


So for the average case...


the while loop will run more than $1$ time but less than $n$ times
there will be more than $n - 1$ but less than $n^2 - n$ comparisons
there will be more than $0$ but less than $(n^2 - n)/2$ swaps, depending on the state of the list
$∴$ how can we show that the average case is also $n^2$ and $\Theta(n^2)$?


I don't understand where $n^2$ can be observed?

Is it because the number of swaps will always be equal to $(n^2 - n)/x$, where $x$ is determined by the state of the list?

And, as stated here (and in other places), on average, with uniform distribution, the number of swaps would be  $(n^2 - n)/4$, which is half the worst case?

I'm confused :( Any help would be appreciated! Thank you.
Let's prove a more general result:


  Any sorting algorithm which only swaps adjacent elements makes $\Omega(n^2)$ swaps on average.


Let us assume that the elements being sorted are $1,\ldots,n$, and their positions are $i_1,\ldots,i_n$. We need to move element $j$ from position $i_j$ to position $j$. Each swap changes the position of two elements by 1. It follows that the number of swaps is at least
$$
\frac{1}{2} \sum_{j=1}^n |i_j - j|.
$$
The marginal distribution of each $i_j$ is uniform over $\{1,\ldots,n\}$, hence the expected number of swaps is at least
$$
\frac{1}{2n} \sum_{i=1}^n \sum_{j=1}^n |i-j| = \frac{n^2-1}{6}.
$$