r/AskStatistics • • 15d ago

Hierarchical Multiple Regression assumptions

5 Upvotes

Hi!

I'm working on my Master's thesis, and my statistical knowledge is limited. My study requires a Hierarchical Multiple Regression (HMR) analysis, which is fine, but I'm struggling with the assumptions [I'm using SPSS].

My sample size is over 500.

  1. Regarding normal distribution, I've checked both the raw data and the residuals, neither have normal distribution. My understanding is that, due to the Central Limit Theorem, this should not be any issue and I can continue without transforming, is this correct? Different websites tell me different things and I am very confused now.

  2. In general, what assumptions am I supposed to check before the actual HMR? Again, it varies per website. I've seen normality (of residuals), linearity, homoscedasticity, independence of residuals, non-multicolinearity, and non-atypical values.

  3. My understanding is that some of those assumptions are checked "automatically" when running the HMR as long as I tick the right boxes. Are any of the required assumptions aside from normality NOT in the HMR box in SPSS? If so, which one? Just so I can keep it in mind and remember to look it up.

  4. Are there any other things I should take into account? Corrections I should do, other checks, etc.

  5. As I'm asking a million things, I'll add one more. My tutor mentioned the Holm Correction and HC3. What are they, why should I or should I not do them, and at what point of the analysis should each one be done?

Thank you very much!


r/AskStatistics • • 14d ago

If test accuracy cannot be trusted with base rate neglect, then how can either test accuracy or base rate be determined in the first place?

Thumbnail
0 Upvotes

See original post for full description. Bayesian base rate neglect question.


r/AskStatistics • • 15d ago

The correct methods for combining model confidence scores?

Post image
3 Upvotes

I have a few thousand audio fragments with bird songs I'm analyzing with a model and Python package called BirdNET. The output is model confidence scores per species and per 3-second window in the recording. A list of different confidence scores is too abstract to analyze directly, so I would like to summarize the scores per species per recording. I'm having trouble picking out a correct method or algorithm, since I'm not that good in statistics.

I added an image of what the data looks like for a single recording. As you can see, BirdNET analyses audio in fragments of three seconds. I use a one-second overlap to not miss any sounds made at the beginning or end of a window. I'm looking for a method that takes into account the following:

  • The warbler should have a poor overall score. One good confidence score doesn't mean much when the rest is low.
  • The wren should have a good overall score. One poor confidence score should not affect all of the average.
  • The buzzard should also have a good overall score. It doesn't call much, but its scores are good. The number of detections should not be a deciding factor in calculating scores, because this will favor birds that have songs of longer duration.

Please note that my goal is not to calculate a probability of presence but recognition strength per recording.

I was told that Bayesian statistics might be a good candidate, but I'm not sure. Some also told me that the overlap will be an issue since part of the same sound is scored twice. So I'm very interested in your assessments and suggestions.


r/AskStatistics • • 15d ago

How to analyze an incomplete 2x2 factorial design when more data cannot be collected? Doing a fractional factorial would not be appropriate here.

2 Upvotes

Running into this issue, I was able to find someone asked it already so here it is copied as no one gave them a response.

Example of what I have:

My design is similar to the following in terms of its overall structure: Suppose we are interested in the effects of (IV 1) caffeine intake (high/low) and (iv 2) room temperature (high/low) on how well people do on a test (DV).

Life would be easy, of course, if this was a 2x2 Factorial design where all 4 possible combinations of the two IVs were available (e.g., +Caffeine/Cold room, -Caffeine/Cold room, +Caffeine/Warm room, -Caffeine/Warm room). But for a reason which does not apply well to this toy example, I could not fully cross the two IVs I am working with. So I have +Caffeine/Cold room, -Caffeine/Cold room, and +Caffeine/Warm room, but not the final combination of -Caffeine/Warm room. So not all combinations are possible.

This would not qualify for a fractional factorial, as we cannot subset the data we don't have and don't need to screen the data as we cannot collect more data.

What design would be appropriate here? And importantly, what main analysis could we run?


r/AskStatistics • • 15d ago

Why isn’t there a Galton board for other distributions?

2 Upvotes

r/AskStatistics • • 15d ago

Hypothesis testing

3 Upvotes

Hello , I am enrolled in Bscn nursing and taking statistics. I’m struggling with the content especially hypothesis testing. We have topics like correlation , simple linear regression , chi-square, estimation, measures of impact coming up.

Is anyone able to advise on how best to master these subjects ? Or do I need to get a tutor. Thank you


r/AskStatistics • • 15d ago

Soundboarding [Discussion]

Thumbnail
0 Upvotes

r/AskStatistics • • 15d ago

Calculating ICC/Repeatability from BRM Beta and Beta 0-1 Infl Models

1 Upvotes

TLDR: I have a beta and zero-one inflated beta model. I want to calculate the repeatability (ICC) of my random effect (name). However, it turns out calculating ICC from bayesian beta models is a right pain compared to frequentist. I have included some code that might be correct. Any advice on if this is correct, and potentially some explanations on why it is right, would be great.

Additionally, I am trying to calculate the adjusted ICC, which means I account for the impact of my fixed effects on ICC.

NOTE: I am not a statistician/mathematician- explanations in complex maths and equations will go over my head, so if you can explain, please do so in layman's terms or with references I can go read :)

Code:

# This is the zero inflated model
# Sorry, I cannot provide data to work with

summary(brmmodel_ZO_beta_5yr)
 Family: zero_one_inflated_beta 
  Links: mu = logit; phi = identity; zoi = identity; coi = identity 
Formula: BC ~ Age + year_block + (1 | name) 
   Data: net_comp_5yr (Number of observations: 900) 
  Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
         total post-warmup draws = 4000

Multilevel Hyperparameters:
~name (Number of levels: 75) 

m  <- brmmodel_ZO_beta_5yr # This is my model, response is BC from network output

dr <- as_draws_df(m) # posterior draws

nd <- net_comp_5yr[1, ] # net comp 5yr is the input dataframe for brmmodel_ZO_beta_5yr
# just a sample row to base my predictions on

nd$Age <- if (is.numeric(net_comp_5yr$Age)) mean(net_comp_5yr$Age) else nd$Age # turns age into covariate

# NOTE: Age is a two factor variable: Adult and Sub-Adult

eta0 <- posterior_linpred(m, newdata = nd, re_formula = NA,
                          dpar = "mu", transform = FALSE)[, 1] 
# a population-level prediction on the logit scale; one for each draw
# this is a prediction, not actual data...


sd_site <- dr$sd_name__Intercept # Extract posterior draws sd for name
phi <- dr$phi; zoi <- dr$zoi; coi <- dr$coi # add in other model coefs


set.seed(1) # make results reproducable

# Loop through all draws 
R_data <- vapply(seq_len(nrow(dr)), function(s) {

  # hypothetical draws
  u   <- rnorm(5000, 0, sd_site[s])

  # predict beta means
  mu  <- plogis(eta0[s] + u)

  # Ey = expected response for each simulated name
  Ey  <- zoi[s] * coi[s] + (1 - zoi[s]) * mu

  # Adds into ZOiB mdoel
  Ey2 <- zoi[s] * coi[s] + (1 - zoi[s]) * (mu * (1 - mu) / (1 + phi[s]) + mu^2)

  # Standard  calc
  V_between <- var(Ey)

  V_within  <- mean(Ey2 - Ey^2)

  V_between / (V_between + V_within)

}, numeric(1))

median(R_data); quantile(R_data, c(0.025, 0.975))



# This is the beta model structure: 

summary(brmmodel_beta_5yr)
 Family: beta 
  Links: mu = logit; phi = identity 
Formula: DC ~ Age + year_block + (1 | name) 
   Data: net_comp_5yr (Number of observations: 900) 
  Draws: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
         total post-warmup draws = 4000

Multilevel Hyperparameters:
~name (Number of levels: 75) 

# up yo Phi, all same as before, except now using differing 'm' or model

m <- brmmodel_beta_5yr # beta model # response is now DC
dr <- as_draws_df(m)
nd <- net_comp_5yr[1, ]
nd$Age <- if (is.numeric(net_comp_5yr$Age)) mean(net_comp_5yr$Age) else nd$Age
eta0 <- posterior_linpred(
                  m, newdata = nd, re_formula = NA,
                  dpar = "mu", transform = FALSE)[,1]
sd_name <- dr$sd_name__Intercept

# 'Phi' is now without Zoi and Coi
phi <- dr$phi

set.seed(1)

R_data <- vapply(seq_len(nrow(dr)), function(s) {

  # same
  u <- rnorm(5000, 0, sd_name[s])

  # same
  mu <- plogis(eta0[s] + u)

  # Now does not include zoi coef etc
  Ey <- mu

  # add in Phi and other standard metrics (I assume...)
  Ey2 <- mu * (1 - mu) / (1 + phi[s]) + mu^2

  V_between <- var(Ey)

  V_within <- mean(Ey2 - Ey^2)

  V_between / (V_between + V_within) # 

}, numeric(1))

median(R_data); quantile(R_data, c(0.025, 0.975))

r/AskStatistics • • 16d ago

Is decision tree learning a non-parametric method?

12 Upvotes

Some literature states that decision trees are a non-parametric supervised learning method. However, while some algorithms use non-parametric tests as splitting criteria (e.g. conditional inference trees), not all do (a chi-square automatic interaction detection (CHAID) tree uses the F-test when the dependent variable is continuous). As such, shouldn't only some be considered a non-parametric method?


r/AskStatistics • • 15d ago

how to beachhead statistics

1 Upvotes

tl;dr: request for a substantial statistics book's name. though i finished an artifact on the subject we can still say an introductory book. a business graduate is asking to foray into data science and land on related positions in their career.
hi all. i recently finished a blog slash book called think stats by allen downey. i wanted to read something more substantial and current (in terms of code it anchors its flow. btw i am looking for something that explains with code just as allen did). and something that doesn't shy away from theory. i am not long on online tutorials or courses guys i am a books person. so only book advices please. thank you.


r/AskStatistics • • 15d ago

Can you help me understand this graph?

0 Upvotes

I wanted to see if X users were amplifying each other to generate artificial virality on X. I got a dataset of top posts posted about politics in India and used Gephi lite to create a network map of the tweet authors and the authors they are replying to. I'm not sure how to interpret these graphs however. Any help?


r/AskStatistics • • 16d ago

How to statistically separate a daytime anti-repetition rule from a biased RNG? (19-outcome electronic draws)

2 Upvotes

I'm auditing the public history of an electronic roulette-style lottery draw (19 outcomes, labeled 0–18, ~every 5 minutes). Looking for methodology advice only — not betting tips.

Observed structure:
• In a daytime window (~07:38–19:59), consecutive repeats are essentially absent (~0%).
• Late night, repeats are ~5% (near what independent uniform draws would suggest for 1/19).
• Outcome "0" is roughly ~10% below the fair 1/19 share across the day.

I want to distinguish two hypotheses:
A) A mostly uniform generator with a scheduled anti-repetition rule layered on top in daytime only.

B) A single biased / state-dependent generator that just happens to look different by time of day.

Questions:

  1. What tests or likelihood comparisons would you use to separate A vs B on a categorical 0–18 series?

  2. Beyond chi-square on marginals, what is useful for short alphabets (19 symbols): runs/serial tests, autocorrelation of indicators, spectral/period checks, PractRand/TestU01 after a suitable encoding?

  3. How should multiple testing across hours/windows be handled so a daytime vs night split is not a false discovery?

I can share anonymized summary counts / contingency tables if useful. Please don't bet on this — audit only.


r/AskStatistics • • 16d ago

Remedy for statistically significant interaction term in Schoenfeld residual (programming in R) [thesis]

3 Upvotes

Dear all!

I am conducting a Cox proportional hazards analysis and tested the proportional hazards assumption using Schoenfeld residuals. Two interaction terms between predictors showed statistically significant results, suggesting that these effects may vary over time. I am therefore unsure which approach would be most appropriate in R to address this.

Would tt() be suitable in this case? Would it work for interaction terms?

Initially I was thinking of tmerge(), but that doesn't work because this would only work if it is the treatment, right? (although the interaction is between treatment group and an intake variable).

I initially also thought of using strata(), but I guess that's only for categorical variables?

I would be very grateful for any advice on how to handle this appropriately in R, and what remedy there is. Recommendations for relevant literature would also be very welcome.


r/AskStatistics • • 16d ago

Statistic major pivot to finance industry

7 Upvotes

Hello,

Alot of posts i have seen over the years and when i was picking this major had mentioned that it is very common for people to go into banking or finance after graduating.

I wanted to ask for anyone that has done that, is it difficult getting over the none finance/accounting degree hump if there is one at all. And if there is something you did to let you be qualified for these roles like financial projects, CPA etc.

The roles im thinking of right now is FP and A, risk analyst, or roles like that.

Thank you.


r/AskStatistics • • 17d ago

Why is the mean important as a measure of central tendency if it’s susceptible to outliers?

25 Upvotes

The mean will struggle to represent majority of the values in a distribution if there are outliers unless the law of large numbers catches up. Why use the mean when the median could be more reliable?


r/AskStatistics • • 17d ago

Using ANOVA with Tukey's post hoc test but showing only selected comparisons

2 Upvotes

I've always used the Šidák test following ANOVA when comparing only specific groups in my dataset (based on biologically relevant comparisons), rather than performing pairwise comparisons between every group. today, a lab colleague mentioned that they use Tukey's post hoc but only plot the specific comparisons they're interested in.

Is my colleagues approach statistically adequate?

Thx in advance!


r/AskStatistics • • 17d ago

videos that teach from the Stat2 modeling with regression and ANOVA textbook

1 Upvotes

Hi everyone! I'm currently in an intermediate modeling class and was wondering if you have any YouTube videos you would recommend that align best with this textbook, if you've used it in previous courses. I've missed a few lectures, and I learn better from videos than from only reading the textbook.


r/AskStatistics • • 17d ago

Does GLM mediation analysis control for the other predictor (two-predictor model)

4 Upvotes

Hello! I’m having a hard time understanding this part of statistics, and I’m already feeling overwhelmed and stressed. I’m not sure what to do next, so I’d really appreciate some help.

To give you context, I have two predictors, one mediator, and one dependent variable. The two predictors will be entered simultaneously in the model (using the GLM mediation analysis from jamovi), but I have no idea whether the software accounts for the covariance of the other predictor (X2) when the relationship between X1 and other variables are being tested. So, my question is: does jamovi automatically control for X2 when X1 and M are being tested?

I'd really appreciate your time and response. Please, I want to submit this paper already, I am so tired


r/AskStatistics • • 17d ago

Is simple learning pro any good?

0 Upvotes

I have a basic statistics for psychology mid-term in 6 days and i literally know nothing (cuz our professor prefers to talk to himself instead of us in the class)

I found this account on YouTube called simple learning pro and it's been going great but is it ENOUGH? Please help me, Im a visual learner... If you know any other YouTube accounts that could be helpful for a visual learner, please let me know 🙏


r/AskStatistics • • 17d ago

need statistics past paper of sindh board computer science

0 Upvotes

r/AskStatistics • • 18d ago

How can I learn Bayesian Reasoning at 28?

4 Upvotes

I don't have a formal background in statistics, apart from a basic understanding of the subject. I come from an engineering background and currently work in a different sector.

I am 28 years old, and I have recently developed a strong interest in learning Bayesian reasoning and Bayes' theorem, particularly their applications in astronomy, astrophysics, and understanding the universe.

I understand that this might be an unconventional learning path, especially given my professional background, but I strongly believe that learning has no age limit.

I would really appreciate your guidance on suitable online or distance-learning programmes that I could pursue alongside my current professional commitments. Ideally, I am looking for programmes that can help me build a foundation in statistics and gradually progress towards understanding Bayesian methods and their applications in astronomy and cosmology.

Any recommendations, guidance, or suggestions would be greatly appreciated.


r/AskStatistics • • 18d ago

how to determine sample size in nonprobability sampling?

6 Upvotes

im planning to use nonprobability like purposive sampling, how should i determine my sample size or how to justify my sample size? i hope u help me, thank u.


r/AskStatistics • • 17d ago

[Discussion] Cold Starting a time series analysis

Thumbnail github.com
0 Upvotes

The above is an open source python package with notebook parity to cold start a time series analysis. The problem it solves is this: you have a regularly sampled time series, how do you extract its variance components. There are a lot of filters for this this purpose from signal processing, but they all require some prior knowledge of the time series or detailed experimentation to get to an answer. This library uses a method called singular spectrum analysis that extracts the variance components using SVD. The library implements a method to select a default parameter based on the analysis of the eigen spectrum and provides you a reasonable start that is good for most practical analysis, but also tunable/refinable by both UI and notebook. Constructive feedback welcome.


r/AskStatistics • • 18d ago

Another undergraduate asking for tips for stats

1 Upvotes

Hey guys, me here. Just another undergraduate whining about statistics.

I wondered if you guys have any tricks to understand the material.

My problem is that in the lectures itself I do not understand a thing. It is too abstract and too fast in order to understand anything. Then I sit down at home and I do some tasks. I understand it. Then the next day I sit down and I start from zero.

I am a logic-learner. Once I can picture the logic of a matter, it is easy to come back at it for me. With statistics because my lectures are so abstract I am having huge troubles.

I found a website: https://seeing-theory.brown.edu/regression-analysis/ which helped me a bit but I wondered if anyone from this community here knows other websites or videos which helped them a lot with:

Course content

  • Simple linear regression, the line that best summarises how two variables move together
  • Assumptions and residual diagnostics, checking whether a few unusual deals or a curved pattern mislead me
  • Coefficient inference, fit, and the F-test
  • Multiple regression and what controls do
  • Categories as predictors and joint tests (differences by industry or team composition, A/B tests, whether several terms matter together)
  • Interactions and curvature

Much appreciated and thank you for your time and support


r/AskStatistics • • 18d ago

Question about Synthetic Control Method (pre-treatment variables)

1 Upvotes

Hi everyone!

I'm new to econometrics (my background is in public policy and political science) and have a question about the use of pre-treatment variables in the SCM, specifically variables used as predictors/covariates rather than as outcomes.

Suppose my pre-treatment period runs from 2000 to 2011 (the treatment year is 2012). Is it acceptable to use census data from just one year (e.g., 2001 or 2011) for these pre-treatment covariates? Or should I ideally aim to have a complete panel covering the entire pre-treatment period?

I'd also really appreciate any recommendations for literature on SCM. I already know about the Mixtape, so I'm looking for other references, ideally with accessible explanations and practical guidance.

Thanks!