r/AskStatistics • • 4h ago

Science sells out.

0 Upvotes

Is anyone else disappointed and saddened by the excesses of our fellow STEM professionals? Everyone at Anthropic is a multi-millionaire by now. I'm just a frugal man in the East Coast but like, I don't need that much money lol. I care a lot more about working for an organization that promotes open, and accessible science with strong integrity. It used to be that way back when, in "the olden days", "scientist" was not actually a profession but rather a hobby that individuals would self-fund out of a desire to pursue their own intellectual direction, rather than the direction of some corporate entity.


r/AskStatistics • • 5h ago

What is the most controversial data cleaning or imputation habit you see in practice?

1 Upvotes

We spend so much time debating model selection, priors, and p-values, yet half the variance in real-world projects seems to come from how someone handled missingness or outliers in the first 20 minutes.

​For those working with messy production or research data: what is a common preprocessing shortcut (like blind mean imputation,,,arbitrary IQR outlier dropping, or treating ordinal scales as continuous) that drives you crazy or one that people over-complicate when simple methods work fine?


r/AskStatistics • • 5h ago

Looking for the best book to learn Statistics for Data Science

Thumbnail reddit.com
1 Upvotes

r/AskStatistics • • 13h ago

Feature engineering for mixed-type time-series anomaly detection [P]

1 Upvotes

I have time-stamped results from a set of checks. Each row includes a check name, a response value, and a creation time. Responses vary in type and scale: counts, decimal values, percentages, ratios, and dates.

I’m using Isolation Forest to detect anomalies. I convert responses to numeric values with type-specific handling: percentages become proportions, large values are log-scaled, some counts are normalized by a related row count, and date responses are converted to numeric time-based values.

I’ve tested three feature-set variants: **32 features** (numeric, ratio, time, frequency-encoded, and binary features; no one-hot encoding), **38 features** (the 32 base features plus six check-family one-hot features), and **43 features** (the 38 features plus five metric-type one-hot features).

The additional features describe recent behavior (previous-result changes, rolling deviations, robust historical deviation, range breaks, and volatility), check and table context (row-normalized values and related-check behavior), timing and history (execution gaps, weekday, history length, and baseline availability), and category frequency.

False positives and false negatives remain high across the variants. I’m looking for general advice on validating whether engineered features represent useful signal, identifying redundant or noisy features, and evaluating feature sets for Isolation Forest.

What approaches would you recommend?


r/AskStatistics • • 23h ago

Bayesian Spatial Model

4 Upvotes

I am trying to fit a spatial logistic Bayesian model using BYM2. I understand I need to assign priors to the intercept, covariates, and hyperparameters for BYM2 and I see many people use different values, but I can't figure out what is driving their choices? How do I know when to penalize something heavily versus lightly? Is there a rule of thumb? I can see what other people have done for this kind of infectious disease model, but the estimates are all over the place.


r/AskStatistics • • 18h ago

Checking Claude's sampling methodology

1 Upvotes

I'm validating an automated text classifier for a research write-up and want to make sure I'm reporting the uncertainty correctly.

**Setup**

- Population: 22,477 text passages (excerpts from court opinions).

- A classifier sorted every passage into three strata: "yes" (N = 7,578), "unsure" (N = 3,170), "no" (N = 11,729).

- I drew a simple random sample within each stratum (fixed seed): 20 from yes, 15 from unsure, 15 from no, and hand-labeled them blind to the stratum.

**Hand-label results (positives / sampled)**

- yes: 20 / 20

- unsure: 11 / 15

- no: 3 / 15

**What I've calculated so far**

- Per-stratum Wilson 95% intervals: yes 84–100%, unsure 48–89%, no 7–45%.

- Estimated total positives = Σ N_h · p̂_h = 7,578(1.00) + 3,170(0.733) + 11,729(0.20) ≈ 12,250.

- Naive stratified SE = sqrt(Σ N_h² p̂_h(1−p̂_h)/n_h) ≈ 1,260, so roughly 9,800–14,700.

- Recall of the "yes" stratum ≈ 7,578 / 12,250 ≈ 62%, roughly 51–78% using the endpoints above.

**Questions**

  1. Is the stratified estimator above the right approach, and is my variance formula correct (I've ignored the finite population correction since n is tiny)?
  2. The "yes" stratum came back 20/20, so its plug-in variance is zero, which seems to understate total uncertainty. What's the standard fix: Wilson/Clopper-Pearson bounds per stratum, a Bayesian beta prior, or something else?
  3. For recall I'm dividing one estimate by another. Should I use the delta method, a bootstrap within strata, or report a range from the stratum bounds like I did?
  4. The "no" stratum is the biggest and dominates the variance. If I can hand-label ~50 more passages, is it right to put most of them there (Neyman allocation), or is there a better rule?
  5. The end use is comparing rates across time periods (positives per 10,000 documents, before vs. after 2023, ratio ≈ 3.4). If the classifier's recall might differ by period, what's the cleanest way to show the ratio is robust? Right now I recompute it counting the "unsure" stratum as positive (ratio drops to 3.2) and call that a sensitivity check.

Thanks. Happy to share more detail on the sampling.


r/AskStatistics • • 16h ago

This is an AI-generated review, correct?

0 Upvotes

My forehead is scrunched. Da fuq?

"Also, the statistical analysis section would benefit from more detail such as the criteria used to identify corollaries. Also, confidence intervals are reported but how they were calculated is not described. “Coefficient” is used in the tables but multiple types of regressions were used. More detail is needed in the statistical analysis section and in reporting the results for the general reader to understand the estimates and their interpretations."

  1. "corollaries"?
  2. how you calculate CIs? Does anyone really report that? Do I really need to specify that these are 95% CIs?
  3. The table reporting poisson regressions reports coefficients, the table reporting logistic regression results has "Odd Ratios" in the column. This is wrong?

(Social sciences, BTW.)


r/AskStatistics • • 2d ago

Dealing with a small dataset

1 Upvotes

I'm trying to model a disease behavior with differential equations with its parameters and initial values. However, The disease, specifically in my case, consists of only 5 data with an empty data in between. For example: (a, (empty), b, c, d, e). I estimated all parameters based on literature, one parameter I fit with nonlinear least square using python.

I am wondering if I can validate the values of the parameters and initial value in my model with real data. I tried using RMSE, R². It shows good results but since I only have 5 data, it's probably biased(?). I tried to do sensitivity analysis of the parameters to the disease prevalence, and I got a result showing that the parameters that are supposed to be decreased (in hypothesis) should be increased and vice versa. I am confused with this since it's literally the parameter of laten infection which should be decreased. Is there any things that I should consider to move forward/fix these issues?


r/AskStatistics • • 1d ago

To those who know data science, what prerequisites in stats do I need to read this paper on racial bias in police violence? Should I start with linear regression?

0 Upvotes

https://kriegman.substack.com/p/post-leading-to-termination-blm-falsehoods

Also are there recommendations for textbooks and resources for learning the specific jargon I encounter most with my studies?

-Bootstrapping

-Trim fill method

-Effect size

-P hacking

-Simpson's paradox

-Collider bias

--Stat significance

-Longitudinal vs cross sectional

-Meta analysis vs systemic review

-Confidence interval


r/AskStatistics • • 2d ago

Tutorial/Course recommendations

Thumbnail reddit.com
0 Upvotes

r/AskStatistics • • 3d ago

Proportional Hazards

Post image
6 Upvotes

The Grambsch and Therneau (1994) test says that proportional hazards are potentially violated for the shown covariate (p = 0.019), but the plotted residuals look relatively straight to me.
As I do not have a lot of experience with this I was wondering if anybody could tell me if this counts as a significant deviation or if it is not deviated in this case?


r/AskStatistics • • 3d ago

ELI5: what jobs can a person with a bachelor's degree in statistical science get?

15 Upvotes

I've been looking into possibly getting a bachelor's in statistical science as my major but I'm still on the fence abt it, so pls be nice!

and pls lmk if I can't ask this question here or smth. I'll take it down!


r/AskStatistics • • 3d ago

How do I analyze this time series?

Post image
36 Upvotes

How can I approach this type of dataset? I am concerned with the forecasting small short term future "groups" of the data. The redline is the cumulative average and blue/green lines are short term trends. The data is slightly skewed below the horizontal black line. Just curious if there are formal methods to analyze/ forecast with this type of data. I have the book "Intro to time series forecasting" by Brockwell and Davis but I am not sure where to look in the book to find how to approach this so any suggestions here would be greatly appreciated.


r/AskStatistics • • 3d ago

Help modeling mushroom fruiting from observational data: Which model should I use?

1 Upvotes

Hi everyone,

I’m working on a personal project combining statistics, data analysis, and mapping.

The idea is to build a model capable of estimating the conditions most favorable to mushroom fruiting in forests, based on observational data collected by users.

I’ve built a spatiotemporal database containing several groups of variables:

- Mushroom observations

- Weather data (dynamic)

- Soil characteristics (dynamic/static)

- Vegetation / land cover (static)

- Topography (static)

- Temporal variables

By combining all the raw data into a single table, I end up with one row per geographic area and per week, with the number of observations (nb_obs) as the target variable.

Initially, I started with a multiple linear regression to identify the most explanatory variables. However, the phenomenon I’m trying to model seems to be strongly nonlinear. For example, some variables probably have an optimal range:

- Too little humidity → few observations

- Moderate humidity → many observations

- Too much humidity → few observations

This makes me think that a linear model is probably not appropriate.

I therefore started looking into models for count data.

I tried a Poisson regression, but the data are heavily overdispersed (dispersion index around 20+), which led me to try a negative binomial regression.

The model converges and the coefficients seem generally reasonable, but the estimated effects are still relatively small, and I’m struggling to understand what I can actually conclude from these results.

I’m a bit lost among all the possible models (Poisson, negative binomial, GAMs, mixed-effects models, zero-inflated models, etc.), and I’d mainly like to understand:

- What type of model would be most appropriate for this kind of problem?

- How should I properly interpret the coefficients?

- How can I combine static variables (soil, vegetation, elevation, etc.) with dynamic variables (weather)?

- How should I properly account for lagged effects (1 week, 2 weeks, etc.)?

Finally, I suspect that my main problem might actually lie in the target variable itself.

What I’m really trying to understand is the environmental conditions favorable to mushroom fruiting, but my database consists of opportunistic observations. I therefore have mostly presence records and no absences.

There is also a strong observation bias: people tend to go mushroom picking mainly on weekends, when the weather is pleasant, and in areas close to large cities.

In other words: No observation ≠ absence of the phenomenon

So I’m wondering:

- How should this type of data be handled?

- Should I generate pseudo-absences?

- Should I model presence only?

- Or am I using the wrong family of models from the very beginning?

I’d be grateful for any advice, practical experience, or references on this kind of ecological/spatiotemporal modeling problem.

My main goal is to understand the assumptions behind the different models before making my approach more complex.

Thanks!


r/AskStatistics • • 3d ago

[Question] where to learn about probability distribution of statistic

Thumbnail reddit.com
2 Upvotes

r/AskStatistics • • 3d ago

which clt is this, and how do I solve it

Post image
0 Upvotes

r/AskStatistics • • 3d ago

Unsure when to normalize experimental data

0 Upvotes

So I recently performed an experiment which was afterwards replicated 3 more times. The results of each replicate are ratios and not absolute numbers. Now I wanna normalize my data in a way that the control-condition is set as 1.

However I'm unsure whether I should normalize the mean for all replicates together or normalize each replicate and afterwards form a mean from the normalized data.

I have the feeling that one option might manipulate the data but I'm not sure which.

If anyone can help or provide a link for resources to help me help myself I'd be really grateful. Thanks :)


r/AskStatistics • • 4d ago

What correlation statistic should I use? (Binary var vs continuous var)

6 Upvotes

I'm conducting a study to see if a psychosocial scale is correlated with some demographic and clinical characteristics in a cohort. The data that I have is from a convenience sample, so it will be skewed and I need to use nonparametric tests.

For my continuous scale vs continuous clinical variables, I plan to use the Spearman correlation.

But for my continuous scale vs binary demographic variables (e.g. man vs woman; young vs old; etc.) what correlation statistic should I use?

- Rank-biserial correlation? Glass rank biserial correlation? Something else?

Thank you for your help in advance!


r/AskStatistics • • 4d ago

Plot curves after coxph frailty model

2 Upvotes

Hello I am asking if anyone is aware of how to draw adjusted cum hazard and survival curves after running a frailty model using coxph. I am using the Surv(start, stop ,event status) framework with gap times. Importantly, I have had to stratify a binary variable as it violated the proportional hazards assumption - using strata(var). The goal is to do curves for the overall sample (showing the two strata), and then separately for each individual variables. I have an interaction and it would be good to plot the hazards of 1 variable versus the actual values of the other variables. Any guidance, particularly code implementation, of this would be very helpful.

I am a clinician and not a statistician, but also not trying to use AI at all as Im against it and dont want to have to use it and then declare it.

I am aware of other setups for example cluster() option for robust standard errors as well as frailtypack, coxme, etc. The curves could be drawn in easily with the cluster() option. However, the research question very much needs a frailty model. Also Ive written out the whole thing based on the frailty findings and Kaplan Meier curves...the findings dont necessarily remain with other modelling options which is a problem.


r/AskStatistics • • 5d ago

CFA/SEM

4 Upvotes

Hi everyone. I am at my wits end with analysis a set of data. I have a very complex model, and did individual cfas, and removed an item from one of the scale. Then, I did the full cfa, and got an acceptable fit. I decided to move on to SEM but it does not have a good fit. I'm quite stressed, and struggling a lot with trying to understand what I'm doing. I have a very complex model. I'm thinking it might have been model misspecification for the sem... But how many changes can we report? I'm at a loss and very confused.


r/AskStatistics • • 5d ago

Spatial CV for hourly satellite LST: spatial or spatio-temporal variogram to choose block sizes?

2 Upvotes

I have hourly geostationary satellite land surface temperature (LST) observations from January to December 2025. I trained a LightGBM regression model using clear-sky observations and conventional cross-validation. I now want to replace conventional CV with spatially blocked cross-validation to tune and train the 2025 model.

My question concerns how to choose appropriate spatial block sizes, using the spatial autocorrelation range of model residuals as a guide. Because my observations vary in both space and time, the residuals may exhibit both spatial and temporal dependence.

For this purpose, should I estimate a purely spatial residual variogram using only pairs observed at the same timestamp, potentially pooling those pairs across multiple hours, or do I need to estimate a joint spatio-temporal variogram and extract its zero-temporal-lag spatial component? How should the resulting spatial dependence range inform the choice of spatial block widths and train–validation buffers?


r/AskStatistics • • 5d ago

how to use jamovi for beginners

0 Upvotes

Hi!! Med student here with a minor in statistics lol. Would anyone be down to hop on a discord call with me to help me with the basics of jamovi for my finals tomorrow


r/AskStatistics • • 5d ago

PhD profile evaluation stat/biostat

0 Upvotes

Hi all,

I'm a 27 yo and I come from a Western European country. I have a very weird profile, and I do not think I would be competitive for PhD programs, but nevertheless I wanted to check.

I have

- a bachelor's majoring in economics, minoring in sociology, from top 400 uni (top 15% students, cum laude).
- a master's in economics (1y) from the top 400 uni as well (rank 2/15, won thesis prize, thesis in health/welfare econ, magna cum laude, good ref letter economist, but writer not so prestigious)
- A research master's (1y) in economics at top 50 uni with econ doctoral coursework (advanced macro/micro, metrics,...) (rank 10/14, cum laude, thesis in health/welfare econ)

- I then enrolled in a PhD (official title junior researcher) at the intersection of health economics and statistics at the top 400 uni, where I wrote a paper on (theoretical) epi-econ models, at the intersection of epidemiological and economic models. My supervisor cut off my funding after 2 years because of disagreements (so no reference letter), but I did have the expected progress and one paper submitted. I never expected having to quit my PhD though, which came as a shock.

- As I wasn't sure what to do after, I decided to pursue a master's in statistics (1y) after (magna cum laude, rank 1/28, top 100 uni). Wrote (very well graded) thesis on causal inference and causal machine learning in biostatistics, reference letter writer is a renowned statistician, thesis is being developed to publish in good stat journal.

Now, I had not really thought about pursuing a PhD anymore at this point as I found myself too old and would have to move abroad, but I did start to hesitate. Could anyone maybe tell me if my profile could be competitive and what kindof programs I could aim for? Thanks in advance!!

Either way, I'd greatly appreciate any input, even if it's bad as I expect, but I just wanted to verify :)


r/AskStatistics • • 6d ago

Bias calculation

Post image
0 Upvotes