  Sports data analytics is a relevant topic in applied statistics that has been
growing in importance in recent years. In basketball, a player or team has a
hot hand when their performance during a match is better than expected or they
are on a streak of making consecutive shots. This phenomenon has generated a
great deal of controversy with detractors claiming its non-existence while
other authors indicate its evidence. In this work, we present a Bayesian
longitudinal hidden Markov model that analyses the hot hand phenomenon in
consecutive basketball shots, each of which can be either missed or made. Two
possible states (cold or hot) are assumed in the hidden Markov chains of
events, and the probability of success for each throw is modelled by
considering both the corresponding hidden state and the distance to the basket.
This model is applied to a real data set, the Miami Heat team in the season
2005-2006 of the USA National Basketball Association. We show that this model
is a powerful tool for assessing the overall performance of a team during a
match or a season, and, in particular, for quantifying the magnitude of the
team streaks in probabilistic terms.
