Suppose we have a sequence of Bernoulli trials $X_1, X_2, \cdots X_T$ which are ordered in time and may or may not be independent. I am interested in understanding the probability of success.. The way I'm thinking about it, I have two primary options.

1. Consider the trials, $X_t \stackrel{iid}{\sim} Bern(\theta)$ and estimate $\theta$.
2. Treat the observations as a markov chain (does success/failure at time $t$ have an effect on probability of success at time $t+1$?

**How do i determine which model is best?** Or in otherwords, how do I estimate the order of the markov chain.

To test the validity of the first model, I was considering using the approach of Andrew Gelman in his *Bayesian Data Analysis* book, where he constructs an "empirical p-value" via simulation using the test statistic $T = \text{longest streak of successes}$. Beyond this, I am unsure how to appropriately compare the different models.