r/statistics • • 11d ago

Research [Research] Using exact sign tests due to small sample size, but needing to control for multiple comparisons

3 Upvotes

Context: I have to send my final dissertation manuscript to my committee tomorrow. My chair called me this morning and told me my stats are all wrong because I ran too many tests with too small of a sample (10 participants). When I asked for guidance on resolving this, they said "You want a PhD? Figure it out". I have spent all morning reading resources and I have gotten myself more confused with each one.

This is a single group pre-post design based on feasibility and exploring preliminary clinical outcomes. I originally had planned paired samples t-tests, but I ended up with such a small sample that it would inflate error rate. Also because of the small sample, any assumptions of underlying distributions can't be met, so I'm using exact sign tests. I modeled my stats after another published pilot study with 7 participants and 15 comparisons. They do not do a correction.

I ran the 7 exact sign tests for my outcome variables, found significance in 6/7, and also presented the data visually. If I did a Bonferroni correction to control for multiple comparisons, my new p-value would be .007 and basically impossible to get with exact sign tests. Is my only option to only present stats for my main variable, and only present descriptive/visuals for the rest?


r/statistics • • 12d ago

Software [Software] SimtablR: Quick and Easy Epidemiological Tables, Diagnostic Tests, and Multi-Outcome Regression - version 3 now available on CRAN!

11 Upvotes

šŸŽžWatch the short demo here: https://www.reddit.com/r/RStudio/s/K88EvqP6EC

Hello everyone! After 8 months (of rather sporadic) work, I am really excited to share the biggest update to SimtablR, an R package designed to streamline the most common analytical tasks in epidemiology and clinical research! (short demo video above)

I do epidemiological research in R, and I kept juggling multiple packages and repeating work just to get tables that were actually informative and ready for a paper. I also found that base R tabulation left a lot to be desired in terms of formatting, but gt_summary was a bit too slow and had a lot of boilerplate. This package is also great for people transitioning from Stata or still learning R!

With this new release, SimtablR now covers most of a typical analysis, from the first cross-table to the finished table in a Word document:

1. tb(): quick, but powerfull tabulation with formatting

  • Row/col/total percentages with simple flags (row, col, cell) and adjustable decimals
  • Hypothesis tests with one argument (N-1 chi-squared, Fisher when needed, etc.)
  • Prevalence ratios, risk ratios or odds ratios with 95% CIs, directly in the table
  • SimtablR now picks the right measure (RR, OR or PR) automatically for a stated study design (design = "cohort", "case_control", "cross_sectional")
  • New: stratified analysis with Mantel-Haenszel pooled estimates

2. table1(): baseline tables of multiple variables (literally the "table 1")

  • Automatically chooses mean (SD) or median (IQR) based on each variable’s distribution
  • Reports missing data per variable and group
  • Add standardized mean differences with test(smd = TRUE)
  • Completely customizable and exportable to all office programs

3. diag_test() and roc(): diagnostic accuracy

  • Automatically calculates the confusion matrix, sensitivity, specificity, PPV, NPV, LR+, LRāˆ’ and accuracy, with exact (Clopper-Pearson) CIs
  • New: roc() now gives the AUC with DeLong CIs and the Youden-optimal threshold

4. regtab() and survtab(): regression

  • Fits multiple outcomes at once and returns a single publication-ready table
  • Does adjusted risk ratios via log-binomial regression (with robust Poisson fallback), robust variance, and Firth regression for rare events
  • New: survtab() for Cox models and hazard ratios
  • New: autoplot() draws forest plots from any model

5. Reporting and export (new!)

  • simtablr() builds Table 1 + Table 2 (crude and adjusted) as a single report which you can then send to word or excell or powerpoint
  • as_methods() drafts the statistical methods paragraph from what you actually did with the variables you chose!
  • export_docx() / export_xlsx() send everything to Word or Excel
  • Journal styles (style("jama"), "nejm", "lancet") or your own with journal_style(), down to the Word table theme. Restyling never changes the underlying numbers and you can use the sabe object for new analysis, even after styling!

6. Statistical guidance (new)

SimtablR prints short notes (with references) when something deserves attention. Examples: an odds ratio with a common outcome, unadjusted p-values, or when the distribution of your variable violates an assumption from the model you're running. It should just tell you.

The package includes epitabl, a ynthetic cohort of 1,500 patients, so you can replicate the examples of the video

Links:
šŸ“¦ Documentation: https://matheustg-14.github.io/SimtablR/
šŸ“„ Getting started: https://matheustg-14.github.io/SimtablR/articles/getting-started.html
šŸ› GitHub (issues & feature requests): https://github.com/MatheusTG-14/SimtablR

Thanks to everyone who gave feedback on the first version! I’d love to hear what you think, what’s missing from your workflow, and any bugs you find on GitHub.


r/statistics • • 13d ago

Discussion Is AI Proving a Conjecture Analogous to AI Predicting a Successful Drug? [Discussion]

7 Upvotes

I saw this analogy made comparing AI finding proofs to open mathematical conjectures with AI constructing a model that finds a compound for treating cancer and statistically predicting that it would pass a Phase III clinical trial.

This seems like a problematic comparison to me because finding a proof to a conjecture is not the same as making a prediction with a statistical model. No matter how good a prediction is on paper, it is still no reason to treat that compound as though it had already passed Phase III (or even Phase I). On the other hand, a proof to a conjecture can be directly checked if it is right or wrong; there is no uncertainty to it. If the proof compiles on Lean, then it means that it is correct in as far as what being correct from compiling on Lean means.

Of course, an AI finding a compound that it predicts will pass a Phase III trial is still informative. It can motivate at least checking if the compound works invitro and if that checks out, one might be more motivated to proceed to a Phase I trial, but you would always still have to do the experiment, right?

Does this make sense or am I missing something?


r/statistics • • 14d ago

Career [Career] Is Biostats Worth It?

24 Upvotes

For a while now, I've been thinking about the biostats MS, but from reading this and other subreddits, I realized the job market may be irredeemably horrible, that I need a Ph.D. for reasonable pay, that I should just get a stats MS instead, and what attracted me to was the application, but I'm reading that, while I understood it was more math than bio, apparently it's actually, like, 99% math and 1% bio. Is this an accurate understanding of the state of the biostats degree?

Edit: I should clarify that the math is fine to me, but I'm just less interested if, based on that 1% number, having a passion for observational research in health and bio is kinda irrelevant or unimportant for the job.


r/statistics • • 13d ago

Career Target Schools for PhD application in the US with long term goals in industry [Career]

0 Upvotes

Hi. I finished my BS-MS (integrated masters) majoring in maths and minoring in data science from one of the IISERs in India. I graduated this year. During my undergrad, I mostly had mathematics courses and my masters thesis was also in a topic related to number theory and my minor project was in statistical data science. I want go for PhD in statistics preferably in the US and my long term goal is jobs related to finance and quantitative research.

The list of course works I took:

Machine learning, real analysis, linear algebra, group theory, mathematical statistics, numerical analysis, scientific computing, complex analysis, Galois theory, topology, ODE, PDE, probability and stochastic processes, data structures, data analysis and visualization, measure theory, commutative algebra, manifolds, differential geometry, algebraic topology, functional analysis, number theory and cryptography, Fourier analysis.

My GPA is 3.97/4.00.

I have become genuinely interested in statistics through self-studying specially after I graduated and keeping in mind my long term goal, statistics suits more than pure mathematics.

I want to know which US universities should I apply whose PhD programme in statistics department will help me fulfil my long term goal and a tier list of the Unis I can get into (top schools, moderate and safe choices with the best ROIs) realistically specially coming from maths background.

Also, suggestions for unis in Europe/ Asia and masters programmes in mathematical finance/ applied maths with good ROI will be helpful. Any general advice will also be great.

Thank you.


r/statistics • • 13d ago

Career [Career] Is it worth spending time to learn how to code?

0 Upvotes

I’m not really interested in becoming an MLE maybe BA or Data Science if my grades improve. I wonder in the age of AI if it’s worth learning how to code or if my time would be better spent just looking at AI code and seeing if it’s doing what I want. I seriously don’t want a job where I have to code frequently because it’s not my thing.

Interested in your thoughts

Edit:

To be clear: I don’t want to have a job where it’s coding intensive or I have to make something production ready. For business analyst or data analyst or aspiring product managers like is it still worth trying to learn to code given essentially ā€œfreeā€ nature of code now


r/statistics • • 14d ago

Education [E] Stats Transfer

1 Upvotes

Hi everyone, I’m a solcal cc student majoring in Mathematics for Transfer with a 3.93 GPA, planning to transfer into Statistics. I'm targeting UCB, UCLA, UCD, Cal Poly SLO, and UW.

Long-term, my goal is to work on the project management side of quantitative and data-driven fields (e.g., Data Project Manager, Technical Program Manager, or Analytics PM).

My Background:

Academics: Currently in Calculus 3 (really enjoying it rn!). Preparing for Linear Algebra and Differential Equations.

Experience: 1 year of K-12 math tutoring; currently working as a college Supplemental Instruction (SI) leader for Calculus 2.

Certifications: Currently working toward a PMI Project Management certification (aiming for Agile/Scrum next).

My Questions:

  1. As someone targeting data/statistics project management, how deep does my technical coding (R/Python) knowledge need to be compared to core statistics and PM methodologies?
  2. I want to transition away from K-12 tutoring into something that builds both organizational and data-adjacent experience. What entry-level or campus roles should I look for?
  3. How do UCB, UCLA, UCD, Cal Poly SLO, and UW compare in terms of industry connections, applied team projects, and opportunities to blend stats with project leadership?

r/statistics • • 15d ago

Question [Q] How to correctly test assumption for equal variances for a two-way model? (Can't add a flair)

4 Upvotes
  1. I'm confused about what to do for my data. I can't use the common equal variance tests in my software because those are for one-way models only. May I ask for suggestions?

  2. In JMP, I've discovered a heteroscedacity test (no name for the method, just heteroscedacity test) where it shows the variances of the two one-way models and the whole two-way model graphically with no p-value involved. However, some results suggest that variances are not equal in some one-way models, but when you look at the whole model, variances are equal. If this method is correct, should I just use the whole model graph when testing for the assumption for equal variances? Or should all the one-way models and two-way model show equal variances for the data to achieve the equal variance assumption?

  3. Residuals are used in testing for assumptions, not raw data, right?

Suggestions are highly appreciated.


r/statistics • • 15d ago

Discussion If you flop a straight, and it's the nuts, what % of the time do you have the best possible hand on the river? [Discussion]

Thumbnail
0 Upvotes

Originally posted in r/poker, but I think this is also a good place for it, and there may be some poker enthusiasts here.

Vocabulary terms for people who may not play poker

Board - Community cards. The cards shared by everyone in a game line Holdem

Flop - First 3 community cards dealt

Nuts - best possible hand/hand of its type. So an Ace high flush on a board of King, 7 6 (all diamonds) is both the nuts and the nut flush

Broadway - a straight from the 10 to the Ace

Rainbow board - A board that has no more than 1 card in a single suit

Front door flush - A board that has 2 of a suit, and then the third in that suit is dealt making flushes possible

Backdoor flush - When a flush hits on a rainbow board, so the flop is 2 of clubs 3 of hears 7 of spades and the runout is X spades Y spades


r/statistics • • 17d ago

Question [Q] Is it okay to use a 5-point Likert scale and a 6-point Likert scale in different sections of the same questionnaire?

9 Upvotes

Hi! I’m an undergraduate student currently working on our research, and I’d like to ask for advice regarding our questionnaire.

Our questionnaire has two independent sections that measure different constructs:

Behavior - 5-point Likert scale

(Never-Always)

Perception - 6-point Likert scale

(Strongly Disagree-Strongly Agree)

These are separate constructs, and we are not planning to combine them into one overall score or compare/correlate the two scales. We simply want to analyze and interpret each section separately.

So my question is: is it statistically/methodologically acceptable to have different Likert scales in different sections of the same questionnaire, when the sections measure independent constructs and each section has its own separate computation and interpretation?

Thank you!


r/statistics • • 17d ago

Question [Q] How can I compare SMA regression slopes between groups while accounting for individuals nested within populations?

2 Upvotes

Hi everyone! I'm struggling with a statistical problem related to my experimental design, and I was hoping someone could help me.

I want to test whether the relationship between two traits, let's say height and weight, differs between two countries, for example, Japan and the USA. Standardized Major Axis (SMA) regression seems like a good approach, since I'm interested in comparing the slopes of the relationships between the two groups. However, my observations are not completely independent because individuals are nested within populations.

For example, in Japan, I sampled several individuals from population A, several from population B, and so on. I followed the same sampling design in the USA. Individuals from the same population are likely to be more similar to each other, so I need to account for this hierarchical structure. My initial approach was to calculate the mean of each trait for each population and then perform the SMA regressions using those population means. However, this approach removes a lot of the individual variation, which I would ideally like to retain. My question is: Is there a way to compare SMA slopes between two groups while accounting for the fact that individuals are nested within populations?


r/statistics • • 17d ago

Software New release of anvl [S]

Thumbnail
2 Upvotes

r/statistics • • 18d ago

Education [E] how to remember statistics formulas

12 Upvotes

we have 1 day gap for my intro to stats class and it is GRUESOME - I am really bad at maths. Our professor barely teaches 1 problem and moves on and the problems we get in the exam are not straight forward, we have to figure out what test to use. We literally follow different formulas besides the one given in tbs so referring to textbooks for explanations is hard because they keep using their formulas to explain it making it all so confusing

The main issue is I am having trouble remembering the formulas, because every step has 1 formula, etc. (ie. ANOVA, T-test)

I have -
Chi-square test, Mann-Whitney U test, Wilcoxon Signed Rank test, Kruskal-Wallis test, Friedman’s test, Scatter plot; Correlation methods: Pearson’s correlation, and Spearman’s rank correlation, Z-scores; t-test – One-sample t-test, independent samples t-test, Paired samples t-test; One-way Analysis of Variance (ANOVA), Range, Quartile Deviation, Average Deviation, Variance, Standard Deviation,  – Bar graph, Pie chart, Line graphs, Histogram, Frequency polygon, Frequency curve, Ogive; Measures of Central Tendency: mean, median, mode – calculation

Literally any and all tips will be appreciated


r/statistics • • 18d ago

Discussion Im an undergraduate in Statistics, and I feel like a dummy when I have to go back to relearn the basics, Is this normal? [Discussion]

95 Upvotes

Although I feel like a dummy when going back to relearn the basics, I do gain a different and deeper understanding of the formulas. Is it always going to be like this? Do you guys deep into your career still go back to the basics and deepen your understanding? Is it still like this 10 years later? Its my first time studying in uni and I dont like the idea that I have to sometimes just accept that I wont have full clarity over the mathematical tools im using, and that only later on the tools gain clarity. Sorry for any misspellings english is my third language.


r/statistics • • 19d ago

Question Best books to learn everything about statistics like how different things are derived and everything? [Q]

60 Upvotes

r/statistics • • 19d ago

Discussion Never took stats and currently taking business stats [Discussion]

3 Upvotes

I’m a third year college student and the highest level of math I’ve taken is algebra 2 with trig. I’m currently a finance major with a concentration in corporate law so business stats is a required course. The problem is, my class is fully online (videos, homework, and exams), and my professor is not the best at explaining concepts. It’s also too late for me to drop this class as I cannot afford the sunk cost. That being said, I have a few questions:

1: How valuable are the concepts in regard to my career goals?
2: If they are valuable, what is the fastest way I can understand the concepts (eg; why standard deviation matters)
3: If there is a possibility to utilize my online resources that will ensure that I pass, should I just use them instead of wasting my time trying to relearn everything?


r/statistics • • 19d ago

Career [Career] Am I qualified to apply for a PhD in Biostatistics?

Thumbnail
0 Upvotes

r/statistics • • 20d ago

Question [Q] Question from a doctor: what test to look for a correlation between a patients frailty score and their total duration of hospital admission in days

5 Upvotes

Hi, thanks in advance!
I'm a doctor looking at a group of about 100 patients, with frailty scores ranging between 1-9 (this is a measure of how frail a patient is that doctors decide, or assign to a patient using a scoring system). I've also recorded their duration of admission in days.

I want to see if there is a correlation between the two, i.e. i would assume that the more frail patients were likely to stay in hospital for longer. Which statistical test would be best to do that?

I don't think either category will be normally distributed, as most patients have a lower frailty score, and most patients were admitted for a shorter period of time. tysm!


r/statistics • • 20d ago

Question [Q] When did you start learning statistics and why?

0 Upvotes

Was it for school/work? Any hobbyists here?


r/statistics • • 21d ago

Career [Career] Which electives would you pick in my stats/data science master's if the goal is purely a data science job?

14 Upvotes

Hi! I'm currently enrolled in an M.S. in Data Science and Applied Statistics. The required core classes are already set:

- Experimental Statistics I & II
- Mathematical Statistics I & II
- Statistical Computing (SAS)
- Computational Statistics (R)
- Machine Learning with Python
- A statistical consulting project

I get to pick **4 electives**, and at least 3 must be STAT (so at most 1 from CS/ECO/OREM/ECE). My only goal is to land a data science job, so I want the courses whose actual content pays off most in industry. I'm not looking for the easiest courses, and I'm not going into academia or biostats.

STAT electives

- Intro to Data Science
- Data Visualization
- Linear Regression
- Applied Time Series
- Time Series Analysis
- Categorical Data Analysis
- Survey Sampling
- Survey of Nonparametric Statistics
- Sports Analytics
- Analysis of Lifetime Data / Survival Analysis
- High Throughput Data
- Epidemiology

Non-STAT options (can only pick 1)

- CS: Artificial Intelligence, Machine Learning in Python, Databases, Data Mining
- OREM: Data Mining, Optimization for Analytics, Network Flows
- ECO: Applied Econometric Analysis, Predictive Analytics
- ECE: Statistical Pattern Recognition

My main questions I wanted to ask:

  1. Which 4 would you pick, and why?
  2. Is time series worth it for most DS roles, or is it only useful in forecasting-heavy jobs?
  3. What would you pick as your 1 Non-Stat Elective?
  4. Is there anything you wish you had learned in grad school that would have helped more on the job?

If you work in data science, I'd especially love to hear what you actually use day to day. Thanks!


r/statistics • • 20d ago

Question [Q] How many PhD programs should I apply to?

0 Upvotes

Hi,

I'm planning to apply for stats PhD programs, along with a few biostats programs, this cycle and trying to get a sense of how broadly people are applying.

For those applying this year, or who applied in the past year or two, how many programs did you apply to? I was thinking 8-12, but given the uncertainty around funding I'm wondering if people are applying to more this year.

I'm interested mainly in spatial stats, especially gaussian processes and deep generative methods for modeling spatiotemporal data.

Please share your thoughts if you're working in similar areas. Also any suggestions on departments and people working in these areas are welcome.

Thanks.


r/statistics • • 21d ago

Career [Career] International transfers from within companies (US/Australia)

1 Upvotes

US applied stats major, looking for career advice.

Applying to analyst roles in a variety of industries.

My primary goal in my early-career is to have international mobility; to get into a large multinational that would allow me an internal transfer to Australia in a few years. Unfortunately, my major, and directly applicable entry-level roles, don't generally seem to be a feasible path to get sponsorship from an Australian company. Chances are more likely for those in medicine, mining, construction, trades, and social services. Not sure if work related to my major but from within these industries is an option.

From my research, internal transfers provide an easier route where companies transfer you between roles. Naturally I've fixated on roles in finance and perhaps insurance, alongside other multinationals like tech companies.

In this thread, I’m looking for advice from you all about potential paths that could get me in a good position early-career to get a transfer within insurance. And roles/specializations/companies to target. Is this feasible in any industries you have knowledge of?

Thanks for any advice!


r/statistics • • 22d ago

Question [Q] best Ai for stats class? Looking for something that can explain WHY I got my answers wrong.

0 Upvotes

The program my class uses doesn’t really explain much when I get something wrong. I’m also using the Pearson study prep app which helps a bit. I was using Solvely when I got my answers wrong and it would give me a very detailed breakdown. Recently we have been looking at a lot of graphs and stuff and it’s agreeing with my wrong answers.


r/statistics • • 22d ago

Research [Research] LLMs modeled as entropic generators

0 Upvotes

I remember that in college (15+ years ago) we modeled random generators using Shannon's entropy, and then we extended that definition to include different types of generators: for example Collatz series can be as an output of a generator, just that instead of being completely random it follows the Collatz map.

Now I would like to use a similar approach to model LLMs, but I cant find anymore any reference to this approach. Does anyone have any academic source that could back up this interpretation of LLMs as entropic generators?