n value in the calculation of BIC This question is building on this post, and on the general formula for BIC.
BIC = kln(n) - 2ln(L)

I need a bit of help understanding what the term number of observations/number of data points/sample size (n) means.
Scenario 1:
Imagine I aim to compare two models, where M1 has 6 parameters (thus, k = 6) and M2 has 7 parameters (thus, k = 7). Both models are fitted on data from 239 participants who provided 65 data points each. If I want to calculate BIC on a sample level, would n be 239 or some other value (e.g., 65 x 239)?
Scenario 2:
Alternatively, imagine I fitted two models for each participant individually to get participant-level parameter estimates. Now I would like to calculate BIC on a participant level to ultimately see how many participants have M1 as a better-fitting model and how many have M2 as a better-fitting model. When calculating BIC to compare the two models within each participant, would n be 1 or some other value (e.g., 65)?
Any help is much appreciated, thank you!

$n$ goes for the number of samples, so if you have 65 samples per participant and 239 participants, it's 65 x 239, and in the second scenario it's just 65. $n$ is usually the number of rows in your data or the number of individual data points you collected. If your log-likelihood is
$$
\ln \mathcal{L} = \sum_{i=1}^n \ln f(X_i; \Theta)
$$
it's the same $n$ as in the summation.
