In III-V nanowires the energetic barriers for nucleation in the zinc blende or wurtzite arrangement are typically of a similar order of magnitude. As a result, both arrangements can occur in a single wire. Here, we investigate the evolution of this polytypism in self-catalyzed GaAs nanowires on Si(111) grown by molecular beam epitaxy with time-resolved in situ x-ray diffraction. We interpret our data in the framework of a height dependent Markov model for the stacking in the nanowires. In this way, we extract the mean sizes of faultless wurtzite and zinc blende segments-a key parameter of polytypic nanowires-and their temporal evolution during growth. Thereby, we infer quantitative information on the differences of the nucleation barriers including their evolution without requiring a model of the nucleus.