Which statistical tests can I conduct to analyse the trend of series data? I have a dataset that measures students' time spent working on a set of mathematics questions. My dataframe looks a little something like this:




Participant ID
Question 1
Question 2
Question 3




1107
54.2
48.9
45.0


4208
53.1
45.6
40.6




I have times for 20 questions for about 200 students. I have observed an overall decrease in time spent per question, as is shown in the figure below:

I would like to accompany this graph with a statistical measure of negative tendency.
I don't think I should use a correlation statistic as the question number is a categorical variable.
I maybe could do a OLS regression, with X being the question number and y being the time spent per question, but I am not sure how to interpret the result.
What else could I try?

Edit
Since a few people have been asking about the context in which this data was collected, you can read all about it in the study pre-registration https://osf.io/f7zgd
 A: The plot itself is perhaps the best way to present the tendency.
Consider supplementing it with a robust visual indication of trend, such as a lightly colored line or curve.    Building on psychometric principles (lightly and with some diffidence), I would favor an exponential curve determined by, say, the median values of the first third of the questions and the median values of the last third of the questions.
An equivalent description is to fit a straight line on a log-linear plot, as shown here.

This visualization has been engineered to support the apparent objectives of the question:

*

*A title tells the reader what you want them to know.


*The connecting line segments are visually suppressed because they are not the message.


*The fitted line is made most prominent visually because it is the basic statistical summary -- it is the message.


*Points that are significantly beyond the values of the fitted line (with a Bonferroni adjustment for 20 comparisons) are highlighted by making them brighter and coloring them prominently.  (This assumes the vertical error bars are two-sided confidence intervals for a confidence level near 95%.)


*The line is summarized by a single statistical measure of trend, displayed in the subtitle at the bottom: it represents an average 6.2% decrease in working time for each successive question.
This line passes through the median of the first five answer times (horizontally located at the median of the corresponding question numbers 0,1,2,3,4) and the median of the last five answer times (horizontally located at the median of the corresponding question numbers (16, 17, 18, 19, 20).  This technique of using medians of the data at either extreme is advocated by John Tukey in his book EDA (Addison-Wesley 1977).
Some judgment is needed.  Tukey often used the first third and last third of the data when making such exploratory fits.  When I do that here, the left part of the line barely changes (it should not, since the data are consistent in that part of the plot) while the right part changes appreciably, reflecting both the greater variation in times and the greater standard errors there:

This time, however, (a) there are more badly fit points and (b) they consistently fall below the line.  This suggests this fit does not have a sufficiently negative slope.  Thus, we can have confidence that the initial exploratory estimate of $-6\%$ (or so) is one of the best possible descriptions of the trend.
A: While your question variables are categorical, they could also be treated as ordinal, since they are done in sequence, so there is a natural ordering of the questions. In that case something like Spearman's rho correlation coefficient would be... ok.
A: Caveat The OP presents an interesting experiment that produced (up to) 200x20 = 4000 measurements. It's best to analyze the data at the student level, not the 20 averages per question, using for example spline regression as the averages don't follow a simple trend and the variances don't look constant either. That being said, the actual question is how to summarize the trend in the averages and what that trend is.
As @whuber illustrates, a plot is a great way to present 20 numbers (at least in two dimensions). If the numbers follow a pattern, this pattern can be highlighted with a judicious use of color and superimposing a line or a curve to emphasize the apparent relationship between the x and y variables.
These are powerful tools because the human visual system is very strong at seeing patterns. Sometimes however the additional graphical elements may suggest a relationship that's not strongly supported by the data.
I, for example, see a negative correlation between question order and time to answer only for questions 1 to 10. For questions 11 to 20, I see a leveling-off of average time to answer and an increase in variance (except for question 18).
Qualitatively, the data is consistent with both the "constantly negative" relationship" and "first-half negative, second-half level" relationship between question and time.
To demonstrate I plot the data twice, superimposing the two relationship patterns in each plot. I also add some commentary in the title, deliberately provoking, to stress the point I want to make with the functional relationship, in front of my imaginary audience. [For completeness, I include my "data" below.]
Neither alternative shown below is convincing (though the constant trend is less unconvincing?) It's better to fit a model that doesn't make strong assumptions about the relationship between question order and time to the full dataset of obseverations without averaging first. Perhaps spline regression, as recommended in Regression Modeling Strategies, is a place to start. See for example here.

And the alternative:

My fake data. I took the average response time from the original plot by eye. I assume time is measured in seconds because the total time is about 400 units and 400 minutes of math is a lot.
math <- tribble(
  ~question, ~time, ~sd,
  1, 40, 4,
  2, 31, 3,
  3, 27, 3,
  4, 24, 2,
  5, 27, 4,
  6, 28, 4,
  7, 26, 2,
  8, 24, 3,
  9, 21, 4,
  10, 24, 5,
  11, 13, 3,
  12, 10, 2,
  13, 13, 3,
  14, 24, 7,
  15, 17, 8,
  16, 9, 1,
  17, 16, 6,
  18, 16, 0.5,
  19, 10, 5,
  20, 11, 6
)

