r/AskStatistics • • 19h ago

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

5 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 • • 19h 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 • • 1d 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 • • 1d ago

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

1 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 • • 1d 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 • • 1d 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 • • 2d ago

Bias calculation

Post image
0 Upvotes

r/AskStatistics • • 2d ago

Why is this statistic like this [Q]

Thumbnail reddit.com
0 Upvotes

r/AskStatistics • • 2d ago

When You See a Surprising Statistic, What Do You Check First?

Thumbnail reddit.com
1 Upvotes

r/AskStatistics • • 2d ago

Order of Operations

1 Upvotes

Recently, while reading the data-processing steps in some papers, I came across something that confused me: whether certain data-processing orders can be swapped. For example, when calculating the trend of the zonal mean of some variable (using a nonlinear method), should the zonal averaging come before the trend calculation, or the other way around? Or is the error so small that either order is actually fine?

I would be very grateful if someone could share their insights with me.


r/AskStatistics • • 2d ago

what to do if you can’t find sufficient data for your research?

Thumbnail reddit.com
1 Upvotes

i m doing a research on a comparative study of russia ukraine conflict vs iran usa conflict on india…i am having trouble as in i can’t find weekly data for all variables…i can find monthly data but then the no.of observations become very low…please help…what to do?


r/AskStatistics • • 2d ago

[Discussion] ITS Help

2 Upvotes

I'm looking to model enrollment pre and post covid. My data is 1 observation per year since 1988.

My initial thought was an easy segmented ITS which I can compare to forecasted post covid trend. The difficulty I've run into is a major which saw a dip in enrollment then a surge in enrollment then a return relatively close to where I expect the forecast to be. The dip and the surge aren't exactly equal but close enough that they will essentially cancel out each other when it comes to fitting a trend line in a segmented regression. And since it's a 1 year dip and a 1 year surge I don't think I can model them as temporary changes in level with just 1 observation for each. Long term, that enrollment potentially stabilized and returned to pre covid conditions is important, but so is explaining that dip and surge. How do I approach this?


r/AskStatistics • • 3d ago

Want to learn Design of Experiments - How?

24 Upvotes

Completed MS in statistics and working. I am interested in learning more (I know the basics, but bombed the subject in MS) DoE. By Design, I mean Agricultural or Veterinary designs, not RSD. The books seems to be way out of my league and can't understand anything more than standard CRD-RBD-LSD. Give me advice on what to keep in mind while learning higher designs so that I don't lose my sanity while reading the books. Suggest YT channels if possible.

My greatest concern is that if somebody asks me to design an experiment for them, and I don't know what questions to ask them and reach a conclusion by judging their answers and the field condictions (e.g: Standard RBD can't be laid on fields so we go for Strip-plot or Factorials). So where to start?


r/AskStatistics • • 3d ago

I need help with Stats and studying and stuff

0 Upvotes

I am a college student enrolled in a dual-enrollment program. I currently have a 64 in y stats class and there's a final coming up in 2 weeks. In order to pass the class and not fail the entire program I have to make at least an 88% on the final. I understand almost nothing because I just really don't want to be in this program anymore and didn't try very hard but now people are pressuring me to get a great grade so I can stay in the program. How do I understand 10 chapters worth of statistics well enough to make a high B on an exam like that? Any advice?


r/AskStatistics • • 3d ago

How to interpret coefficients of linear and quadratic terms?

1 Upvotes

UPD: With this regression I simply want to answer the question whether there is a trend in sales (b1) and if and how the trend changes (b2). I search the answer to these questions:

  1. If F-test allows me to reject H0: b1=0 and b2=0, then I can use the values of b1, b2 to answer my questions, while ignoring individual p-values for b1 and b2?
  2. If F-test doesn't allow me to reject H0: b1=0 and b2=0, then shall I look at individual p-value of the coefficients? And then if based on individual p-values I have b1 significant, b2 insignificant - that means there is a trend but no curvature and, the opposite, b1 insignificant, b2 significant - there is no trend but there is a curvature?

I regress weekly sales on week number centered around its average and week number centered around its average**2. I interpret the coefficient b1 of linear term as a direction of the trend (i.e. the sales either decline or grow), and I interpret the coefficient b2 of the quadratic term depending on the sign of b1: b1>0 b2>0 - growing trend that grows more b1>0 b2<0 - growing trend that slows down b1<0 b2>0 - declining trend that slows down b1<0 b2<0 - declining trend that declines faster

I'm confused when I should treat b1 and b2 as zero (i.e. no trend and acceleration/deceleration detected by the model)

A) Shall I look at individual p-value for b1 and b2
B) Shall I look at a p-value from F-test for joint significance of linear and squared term


r/AskStatistics • • 4d ago

ADS programmer at Genentech USA

Thumbnail reddit.com
0 Upvotes

r/AskStatistics • • 4d ago

Suggestion for a gentle (text)book on statistics? Or resources in general

1 Upvotes

I'm a programmer in over my head. I learned how to do standard deviations and z-scores, specifically to analyze and compare the output of super simple hash functions and pseudo-random number generators. But it resulted in a lot of biased/inconsistent results that didn't feel statistically significant. So I'm a bit overwhelmed and feel gaps in my knowledge. I feel like I need to take a break and take some time to learn statistics from scratch.

Any suggestions for a book or course or something that is approachable, starts from the foundations and builds up to things like the birthday problem, standard error, and binomial distribution? (all things I have clocked as being relevant for my needs). I figured I'll need to cover Chi-squared test as well, which seems more advanced.


r/AskStatistics • • 4d ago

Guidance on Longitudinal Models [Question]

1 Upvotes

I am trying to understand outcome variable C which was measured at 3 time points. I am predicting it with variable B, which is also measured at the same three time points. I also have measures of age and variable D, measured at baseline. I would like to ask: How much of the time dependent differences in variable C are acounted for by the time dependent differences in variable B? And how are these relationships affected by age and variable D? I need guidance on what textbooks or papers address this sort of model as well as what this type of model is called.


r/AskStatistics • • 4d ago

Probability that Bernoulli trail "greater" than another?

1 Upvotes

So this might a dumb poorly worded question question sorry, but I'm at a loss for how to figure this out (I've not study Statistics formally).

(This is not for homework) I am playing shadowrun (5e) and in that you sometimes make opposed rolls, where a player will roll n dice (with 5,6's being success) against the GM's pool of m dice (with 5,6's being success), I know that each 'persons' roll can on their own be modeled as a Bernoulli Trail, but I'm at a total loss for how to calculate this generally without just resorting to a brute force calculation in excel or similar program for a specific n and m.


r/AskStatistics • • 4d ago

Why doesn’t a very high p-value, a very insignificant chi square statistic does not point us towards the fact that Null Hypothesis may actually be True?

0 Upvotes

Like in a test of independence why cant I say “ this points us towards the conclusion that X does not dictate Y, they do not depend on eachother”? Why must we say just “insufficient evidence to show a dependence relationship” when we are so comfortable on concluding what we want to conclude when we reject H_0 with

Like, why not can a very insignificant statistics result at least point us towards some different empirical result maybe even a question of our theories (whether it is about inequality between sexes or natural science stuff)?

I get that because p value is the probability of such a weirdo stat we get given H0 is true. but if the probability is high, doesnt that say something besides “insufficient evidence bla bla”??


r/AskStatistics • • 4d ago

Worried about career

1 Upvotes

I’m majoring in applied mathematics with a minor in data analytics, and I’m still figuring out what I want to do after graduation. I enjoy math, but programming isn’t my strong suit yet. How hard is it to get into data science with my background? Would you recommend aiming for a job after my bachelor’s, going for a master’s, or exploring a different field where I can use more math?


r/AskStatistics • • 4d ago

Guidance on Longitudinal Models [Question]

Thumbnail reddit.com
2 Upvotes

r/AskStatistics • • 5d ago

[ QUESTION] how important is sample size? What could be the margin of error on a study with lets say 500 people and one with 5000

2 Upvotes

i was reading a random study, it did not have a very big sample size around 600 i believe. google says the margin of error is slim, but i dont really know much about stats so id love a detailed explanation


r/AskStatistics • • 5d ago

BRT/RF vs Bayesian Spatial Methods

4 Upvotes

I am trying to do a spatial study predicting occurrence. I have a whole bunch of geographic covariates stored as rasters and want to use a method to compare their associations with an occurrence (it's logistic, it either happened or it didn't). I know how to use BRTs and RF and think they would be an applicable methodology. But other people are using Bayesian methods to help with spatial autocorrelation etc. I have reasons that I'd rather do ML but I need to have my rationale water tight.

Is anyone able to have an opinion or help me with a pros/cons list of each. I could use anything I can get. Chat GPT is just being sycophantic at this point.

If you have more interest in the project:

I have a database of provinces reporting a human transmitted disease and want to know what covariates are associated with reporting (this could potentially help with understanding surveillance, allocating resources, and vaccine targeting). I am familiar with ML techniques and am inclined to use BRT/RF to analyze the associations. But lots of papers are using Bayesian techniques to get the spatial autocorrelation aspect. My plan was to do a BRT and then use spatial block cross validation to try and account for autocorrelation and predictive power (not the same issue addressed I am aware but feel like it at least addresses it a bit). To quantify uncertainty I would bootstrap the data and run multiple iterations to get some variation. I think Bayesian techniques work well, but I think they can quickly be misused when you don't spend the time to understand the confounding, collinearity, and any potential interactions between covariates. I think when the covariates are so related like this it is better to have the machine figure out the relationships and intricacies and then try to add in other information through other methods.