Say that we are sampling from a random variable $X$. We have already sampled $x_1, x_2, x_3, ..., x_n$ and are about to sample $x_{n+1}$
Is there a way to determine for an $x_k$ how confident we are that $x_k$ is dependent on $x_{k-1}, x_{k-2}, ... , x_1$? For example, say we were flipping a coin (1 is heads, 0 is tails) and we get the sequence $0,1,1,0,1,0,0,0,1,1$. Can we determine whether or not the coin is dependent on past tosses based on this data?
I think one way to write this would be
$$ P(x_{n+1} = f(x_1, x_2, ... , x_n)) $$
Sorry if this is a dumb question, but it had really been boggling my mind for a while
Broadly speaking, it would be nearly impossible to do this if you're just looking for evidence that there is some connection between the previous results and the next one, mainly because there are so many possible mechanisms that could be in effect that you'll never have enough data to prove that one of them isn't happening.
However, for some kinds of dependency there are ways of measuring those kinds of effects. For example, you can look at the autocorrelation of the series of coin flips, and use some variation on a standard test to compare it to the autocorrelation of a true memoryless process.
You could also create a new series $x'_n = |x_{n+1} - x_n|$ (i.e. it's 1 if adjacent results are different, 0 if they're the same) and do a hypothesis test on $H_0: P(x'_n = 1) = 0.5$. That will only test for a very simple dependency, though, which is why the autocorrelation will offer a little more evidence.