# Re-Defining, Analyzing and Predicting Persistence Using Student Events in Online Learning +
## 4 Description of the Model to Identify Local Persistence
With these assumptions, the aim is to define an indicator of local persistence in the range 0-1 for the learner local persistence. One initial question is how to consider the sequence of attempts of each exercise for the overall value of local persistence. One possible approach is to compute a value \begin{table}
\begin{tabular}{c c c} \hline \hline
**ID** & **Sequence** & **Idea of Local Persistence** \\ \hline
1 & 0 & The student is not persistent as s/he does not try the exercise again (after getting 0) in order to get correct answer. \\ \hline
2 & 0 1 & The student shows local persistence as s/he attempts the exercise again to get it right. \\ \hline
3 & 0 0 0 0 1 & The student shows local persistence and s/he shows more local persistence than in case 2 as s/he needed a lot of attempts until getting the answer right. \\ \hline
4 & 0 0 0 0 & The student shows certain local persistence as s/he has tried the exercise several times, but s/he has not got the correct answer. Local persistence should be greater than in case 1 but smaller than in cases 2 and 3. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Sequence of attempts of difference exercises. of local persistence for each exercise and calculate the average for all of them. The limitation of this approach is that it does not allow weighting the exercises easily so that exercises where the students show more local persistence have a higher weight. For example, in Table 2, a student will get the maximum value of the maximum local persistence (1) in both cases 2 and 3 because s/he has attempted the exercises until getting the correct answer. However, the student \"shows\" more local persistence in case 3 because s/he needed more attempts and s/he has been persistent after incorrect answers more times. In order to weight the exercises depending on the local persistence showed, local persistence is computed as a single fraction, where the numerator and denominator increase every time the student shows local persistence in each exercise. If more local persistence is shown (e.g., case 3), more units will be added to both numerator and denominator to give more importance to the exercise. This way, this model will increment one unit in the numerator and denominator each time the student attempts an exercise once s/he has got the exercise incorrectly at least once. Equation (1) shows how to compute local persistence. Note that this equation computes the local persistence at student level considering the set of exercises s/he has done (pair \"student-set of exercises\"), but not for the pair \"student-exercise\" nor for the triple \"student-exercise-attempt\". Thus, there are no values of persistence associated to each exercise, but only an overall local persistence for each student:  
\[\textit{Local Persistence}=\frac{\sum_{i=1}^{i=n}\min(attempts_{i}-1,\textit{ stop})}{\sum_{i=1}^{i=n}[\min(attempts_{i}-1,\textit{stop})+\textit{penalty}\cdot(1- \textit{grade}_{i})]} \tag{1}\]  
Equation (1) contains the following variables:  
* \(n\): Indicates the number of exercises the student has attempted. * \(i\): Represents a particular exercise the student has attempted. For example, \(i=1\) represents the first exercise the student took in the SPOC. * \(attempts_{i}\): Indicates the total number of times the student tried exercise \(i\). The equation has the term \(attempts_{i}-1\) to exclude the first attempt, as no persistence is shown in that time (as the student does not decide whether continue or not after difficulties)
* \(grade_{i}\): Binary value which indicates whether the student managed to get the correct answer of exercise \(i\) (\(grade=1\), the maximum grade) or not (\(grade=0\)). For exercises which may admit partial grades (e.g., checkboxes), \(grade=1\) if the exercise is totally correct and \(grade=0\) otherwise. * _penalty:_ Variable to penalize when students do not get the correct answer of the exercise. This way, when the answer is correct, the numerator is not changed, but the denominator is increased to decrease the overall value of local persistence.