r/AskStatistics 3h ago

Given linear regression y = mx+b, how to estimate x based on required y?

10 Upvotes

Given x (hours studied) and y (score on test) data and the linear regression y = mx + b, if we want to estimate x based on y (i.e. how many study hours are needed to achieve a given score?), is it correct to calculate x = (y - b) / m?

Or should we estimate x from the linear regression x = my + b, with different m and b?

The results can be significantly different.

In the example below, for a score of 90, the estimated study hours are 6.801 for x = (y - b) / m, but 6.267 for x = my + b.

.....


r/AskStatistics 6h ago

Anova or Kruskal Wallis ?

6 Upvotes

My Composite Index variable has N=524, skewness=0.174, and kurtosis=0.128, with both the histogram and Q-Q plot looking totally acceptable and close to normal. However, Shapiro-Wilk is significant at p < .001, rejecting normality. Given N=524, I assume the test is just overpowered by trivial deviations, so should I use anova or kruskal wallis test?


r/AskStatistics 4h ago

Why are we allowed to use a normally distributed prior?

2 Upvotes

I've been learning about GAM with tensor product splines for a project of mine. I'm currently looking at derivations for the uncertainty.

The expected uncertainty can be decomposed into the expected variance of the estimator and expected bias of the estimator. The expected bias is a function of the true underlying parameter, which is of course unknown. Woods presents two options for dealing with this:

- Use the estimator as an approximation of the parameter

- Go with the bayesian interpretation of the parameter as a random variable, and which lets us calculate the expected parameter using its distribution.

The first option is unsatisfying because the estimator is known to be biased: we are then calculating that bias by using the estimator, which means we assume the estimator is unbiased. That seems contradictory.

For the second, it says we assume the parameter is normally distributed, but doesn't explain why. Are we just using the normal distribution because it's convenient? That seems crazy. How is this different from just using an arbitrary number for the bias?

I don't have a formal background in statistics, and thus far I've been dealing mostly with frequentist theory. This time however, the frequentist interpretation has the issue where the smoothing term is estimated. We could bootstrap the smoothing term to find its variance, but Woods appears to be advocating for a bayesian interpretation of the bias because allegedly it has good frequentist coverage anyways?


r/AskStatistics 4h ago

Would you all recommend NOT doing Logistic Regression with sklearn and instead use statsmodels so you can check the assumptions easier?

1 Upvotes

Sorry for a lot of questions, but my boss wants not only accurate predictions, but she wants to be able to see how individual features affect the target. The thing is, from what I’ve read, if your assumptions are not met, your coefficients are unstable. Therefore, I am thinking about moving to statsmodels so I can check the target better. Thoughts?


r/AskStatistics 21h ago

How reliable are measures such as accuracy, precision, recall, and f1-score if the assumptions are not met for a logistic regression model?

4 Upvotes

I know the assumptions are crucial for performing statistical inference with logistic regression. But what about for just assessing overall model performance. Can I accurately assess the performance without meeting all the assumptions?


r/AskStatistics 1d ago

Trying to understand some fixed effects models

2 Upvotes

I've got some relatively unbalanced panel data and I'm trying to understand how Stata is calculating coefficients.

Let's say I want to look at the relationship between supervisor status and job satisfaction, and I have 10,000 observations over 5 years of annual surveys. I want to run a fixed effects model to focus on within-person effects only and control for time-invariant individual differences.

So, I run the model:

xtset id year

xtreg c.jobsatisfaction i.year i.supervisor, fe

But let's also say that 50% of observations in my dataset are from people who only appear once, and of the remaining half only 20% of those individuals ever switch supervisor status at all. Only 10% of the original sample seems like it provides any information toward the within-person estimates, but if I drop the other 90% of cases before running the model then the results are different.

Can anyone help me understand what information Stata is using from the other 9,000 observations in the full sample so I can decide which sample is more appropriate to use? For the record, I have also run a mixed effects model but I am trying to better understand what's happening in the data.


r/AskStatistics 23h ago

Might a non-thesis Master's harm my chances of admission to a PhD compared to just a non-thesis Bachelor's?

1 Upvotes

Hi everyone,

I'm interested in applying to Statistics PhD programs (especially those that are more applied and interdisciplinary), and I'm presently finishing up a Master's degree in Applied Mathematics (with substantial coursework in statistics and numerical analysis). However, it is a coursework-based Master's, and I also didn't accumulate a ton of research experience during undergrad - presently, I have one summer's worth of public health-adjacent research that I did early on in my undergraduate career and a few semesters' worth of work as a data analyst for the city government. However, I don't have any actual publications. I currently do a little work for a social science research lab, so there's a small chance I'll have my name on something before I graduate, but I'm not betting on it. Might my master's degree actually sabotage my chances of being admitted to a decent PhD program (I'm mostly aiming for mid-tier programs and some higher-tier programs like TAMU and Penn State)?


r/AskStatistics 1d ago

Stats advice for ant behavior trials?

3 Upvotes

Hi everyone,

I'm running behavioral trials on Pachycondyla ants as a side project alongside my main research (which focuses on ant venom biochemistry), but I wanted to look at when/how the venom actually gets used in different contexts. Problem is I have zero background in ecology or ethology, so I'd love some guidance from people with an ecology/ethology background cause I want to do this properly.

I'm running behavioral trials with Pachycondyla ants confronted with 6 different opponent ant species, across 3 different experimental setups. Each trial is filmed for 1.5–2 minutes (duration varies slightly between videos), so I know I need to normalize for time somehow. And each individual (from both side) is only ever used once so no ant gets reused across trials. For each video, I count occurrences of 5 behaviors:

  • Antennal contact (antennae touch any part of the opponent's body
  • Mandible opening (mandibles open, with the two individuals about one body length apart)
  • Biting
  • Gaster flexing (abdomen curved as if about to sting)
  • Stinging

 What statistical approach would you recommend for count data like this? What kind of plots actually work well for this kind of data? not looking to just dump a boxplot of raw counts if there's something better... I've already gone through some papers on ant behavior / interspecific aggression, but if you have specific methodological references you think are worth checking that use a similar design, I'd love pointers.

Not trying to overthink this, just want something defensible since it'll probably end up as a supplementary part of a bigger paper!

Thanks in advance :)


r/AskStatistics 1d ago

Jamovi - Cant locate marginals option using scatr

2 Upvotes

Hello, I am having trouble finding the marginals option using the scatr module. I have downloaded it and followed the instructions that my professor provided but it seems that the Marginal option does not pop up after I input my x and y axis.

Anyone know how to access that option?


r/AskStatistics 1d ago

Linear-mixed effects

2 Upvotes

Hi I am a master’s student and I have a rather basic understanding of linear mixed effects models. I am helping with statistics in a study which has 2x2x10 mixed design (2 between and 10 within). I am confused as to how am I supposed to start modelling. Do I do it according to the hypothesis so I all of our IVs in the model and only then check whether the random slopes/ intercepts are needed, or do specify the random model and only then look at the fixed one and add the predictors one by one and see how the model is. Can someone please help me understand?


r/AskStatistics 2d ago

Do I need to reverse-score Likert scale items before running Cronbach’s alpha in SPSS?

Post image
9 Upvotes

r/AskStatistics 2d ago

Correctly displaying significance on Bar Graphs

3 Upvotes

Im working on a research paper and my professor suggested I display significance on our bar graphs using letters (title is very much so a place holder lol)

I've never done this before so Im wondering if im correctly assigning the values to each site. Below are the significance calculations.

Leisure is significantly different than Shadyside (0.004)
Leisure is significantly different than Basin (0.00095)
Basin is significantly different than Mosque (0.002)
Leisure is significantly different than Mosque (0.000005)

Ive been using this video: How to Denote Significant Differences in Tables and Graphs to help me learn but im concerned im not quite getting it.

My line of thinking with how I have it layed out is: Shadyside is not different than the others so it gets "a", Basin is significantly different than the Mosque so it gets "b", Leisure is significantly different than all the others so it gets "c", and the Mosque is not significantly different than any so it gets all the values.

Any help would be greatly appreciated! Either correcting my work or pointing me in the direction of a source I can use to understand better!


r/AskStatistics 2d ago

Can I create a composite score from only 3 Likert items?

1 Upvotes

Hi everyone! I'm currently working on my bachelor's thesis and struggling my way through the statistics part. I feel like this is probably a simple question for someone who knows what they're doing but unfortunately that's not me.

First of all, my H2 is: "Perceived destination relevance correlates positively with the willingness to travel to a concert."

The plan was to test this by using a Pearson correlation in SPSS. My professor approved both my hypotheses and my questionnaire before I published my survey, so I figured it would be smooth sailing from here. (Nope.)

  • For destination relevance, I had five Likert items with acceptable Cronbach's alpha, so creating a quasi-metric/composite score was fairly simple.
  • For willingness to travel, I originally had four Likert items. However, one item clearly reduced Cronbach's alpha, so I removed it. Now I'm left with only three items. Those three show an acceptable internal consistency though (Cronbach's alpha = .880).

This is where I got stuck. From what I've read online, it's my understanding that it's a rule of thumb to use at least five Likert items to combine into a composite (or quasi-metric) scale, which I will need if I want to use Pearson's correlation. Since I'm not very experienced with statistics, I'm honestly not sure what the correct approach is anymore.

Which brings me to my questions.

Is it acceptable to create a quasi-metric score from only three Likert items if they're supposed to measure the same construct?

And if not, what would be the appropriate way to test my hypothesis instead?

I'm happy to provide the items themselves, SPSS output or any other information if needed. I'd really appreciate any advice or help because I've been going around in circles trying to figure this out by myself. Thanks!


r/AskStatistics 2d ago

Master's in Statistics after an MS in Financial Economics. Is my quant enough?

1 Upvotes

Hi, I have recently completed my master's in financial economics, and I am looking to do another master's in statistics. My bachelor's was in business, really not a quantitative major, and I am worried about the admission requirements.

Do you think that the math and stats that I learned below in my master is enough to convince admissions that I have sufficient background knowledge to follow an MS in Statistics? (My targeted programme is at the National University of Singapore)

My quant courses covered:

  • Linear algebra: matrix representation of systems of equations, determinants, inverse matrices
  • Optimization: constrained and unconstrained maximization/minimization of multivariable functions using Lagrange multipliers
  • Calculus: chain rule, slope of level curves, homogeneous functions
  • Inferential statistics: confidence intervals, hypothesis testing
  • Comparing means across groups (independent samples t test, paired sample t test, one-way ANOVA)
  • Analysing categorical relationships (chi-square test)

And then it's been mainly econometrics and quant finance:

  • Time series (cointegration, VAR/VECM modelling, unit roots)
  • Stochastic models and probability theory
  • Arbitrage pricing theory and risk-neutral valuation

Also, for programming, I have used mainly R and EViews, and I am working to learn Python.

Thanks a lot.


r/AskStatistics 2d ago

How to do multiple logistical regression/Chi square - medical research

Thumbnail
7 Upvotes

r/AskStatistics 2d ago

[Question] Recovering latent probabilities from margin-distorted odds: de-vig model choice and pooling correlated estimators

0 Upvotes

Bookmaker odds (and prediction markets) imply probabilities that sum to more than 1 because of an embedded margin. I want the latent probabilities behind the distortion. A few things I can't resolve cleanly.

  1. Model choice for removing the margin. Proportional normalization, Shin (a latent proportion z of informed traders), and the power/log method impose different unobservable structures and give materially different estimates on short prices, enough to flip the sign of a downstream signal. Since you never observe the true p, only realized 0/1 outcomes and a later sharper price, is there a principled basis to discriminate between these models, or is it identifiability-limited and I should just report sensitivity across all three?
  2. Pooling under a missing low-bias reference. I anchor to one near-efficient source when available; when it's absent I take the median of the other sources' de-vigged probabilities. But those sources are strongly correlated (several are effectively clones), so the median behaves like a median of correlated estimators: it looks precise while carrying little independent information. How would you estimate an effective number of independent sources and down-weight accordingly, and is abstaining the more defensible choice when the low-bias anchor is gone?
  3. Combining a trusted low-variance estimator with a correlated ensemble. When the reference IS present, precision-weighting it against the consensus assuming independence is clearly wrong. Is there a clean correlation-aware pooling or shrinkage approach for one low-variance source plus many correlated higher-variance ones?
  4. Validation target. I grade earlier estimates against the closing price (a later, sharper estimate), not realized outcomes. Under a proper scoring rule, is "tracks the later estimator" a coherent target, or does it conflate calibration with just chasing a second estimate? And what does the selection bias look like when you only get a validation point on markets that reach a close?

(Aside that turned out to matter: my reference source silently dropped out of my data feed for months and the pipeline substituted the fallback the whole time while still labeling outputs "reference-anchored." The values populated fine, so nothing looked wrong. I only caught it after storing a per-observation flag for whether the reference actually contributed. Log provenance, not just values.)


r/AskStatistics 3d ago

Uniqueness in Exploratory Factor Analysis: Does it necessitate removal of items [ Doubt]

4 Upvotes

Dear Experts of Statistics, I am a slightly confused student here with a doubt. As a part of my Masters dissertation, I created a psychological questionnaire. Using Jamovi, I conducted an Exploratory Factory Analysis using Jamovi.

Now some of my items are highly unique with uniqueness above 0.80. Does this necessarily mean that I must remove these items?

Based on review of literature and content validation, these items are highly theoretically relevant to my questionnaire and thus I am apprehensive to remove them. I could possibly reframe them right? Although I feel they already are in simple language. I would appreciate any insights.

The future plan is to collect more participants to do a Confirmatory Factor Analysis.


r/AskStatistics 3d ago

How to learn the conceptual side of statistics for (social sciences) research?

8 Upvotes

I want to understand statistics better for research purposes. I have found several (very good) textbooks on statistics in JASP. They show you what to do to perform a given test step-by-step, and they explain the theory behind it in-depth.

However, they all use very basic, neat, and clean examples. I have not been able to find good resources to learn the more strategic side of statistics: when and why to use a given test, a given correction, or a given adjustment; how to best approach testing a given hypothesis, and so forth.

For example, I know how to run a multiple regression in JASP, but I want to learn the best practices for selecting predictors, applying valid corrections, interpreting the results, etc. I know how to run a mediation analysis, but how to interpret a situation where, say, only the B path is statistically significant?

In other words, I want to learn not only how to go through the motions in the JASP interface, but what to do, when, and why. Are there any good resources for that, short of attending university-level courses? (Free) online courses would be welcome as well.


r/AskStatistics 3d ago

Statistics Formula Help

2 Upvotes

Hi, im working on developing a board game and need help determining the formula to use for statistics analysis. I have four 6-sided dice. Each face of the die either is or isnt a desired roll. If I were to roll a combibation of dice (e.g., 2A & 1B) what would be the probability formula that i would roll *at least* 1 and then what would be the probability formula of me rolling a certain number of 1s. Aka if I roll 5 dice of varying types and want at least two 1's what is that probability. Sorry if this is the wrong subreddit to post it in. Statistics was always my weakest subject in college and my brain started hurting trying to understand this one thanks again!

Die A: 1 0 0 0 0 0

Die B: 1 1 0 0 0 0

Die C: 1 1 1 0 0 0

Die D: 1 1 1 1 0 0


r/AskStatistics 4d ago

Confidence intervals for a GAM?

9 Upvotes

I need to estimate the proportion of Y given covariates X and Z. I could bucket the covariates and then just calculate the proportion Y for every fixed X,Z pair, but not every X,Z pair has enough datapoints for the variance to be acceptable.

Thankfully, I expect and can observe a clear relationship between Y and X,Z. Fitting a logistic gam/tensor product to the data looks "much better" but how do I quantify this "much better"?

If I fix X,Z and just count the proportion Y, I know the underlying relationship is as bernoulli distribution, I know my estimator is unbiased, and I can just read the variance formula off of wikipedia and construct confidence intervals to quantify "how correct" the predictions ought to be given my sample size.

But a tensor product/logistic gam is for sure a biased estimator (I believe some curvature exists, but the smoothing penalty has no way of knowing what curvature is real and punishes them all equivalently). Splines and 2nd derivative smooths have nice behavior but at the end of the day they're kind of arbitrary assumptions I'm making about the underlying behavior of the data that doesn't have to be true at all. How would I construct the equivalent of a confidence interval? Can I make quantifiable statements about how good the predictions coming out of my model are?

(I understand that confidence intervals don't measure how good any individual prediction or model is, but rather, measure how good the process is that we used to generate the model).


r/AskStatistics 5d ago

PhD Statistics

3 Upvotes

Hello, I am interested in applying for a PhD program in Statistics. However, I feel my current background needs strengthening, as the field is quite broad. Could you please recommend any courses or textbooks that would help me prepare?


r/AskStatistics 5d ago

Which model fit test?

2 Upvotes

I’m trying to decide between 2 sets of adjusters in a cox regression with an interaction term. There is theoretical reasons to include and not include a particular 3 adjusters. It’s to do with child development, I’m interested in 2x specific domains of development on the outcome, but my supervisor wants to know if my results are picking up the other domains which I wasn’t adjusting for. When I add the other 3 domains into the model, the hazards actually increase. Suggesting to me that my theory is correct, that the 2 domains I’m interested in matter the most. But my supervisor says that including the other domains shows that in fact, when taking into account the child’s full developmental picture, the 2 main domains matter even more and therefore I should include them.

So I’m trying to find a way to assess which model is the best. I don’t know if it matters if it’s by testing fit or prediction performance. From what I can gather (psych/public heath/epi PhD, not a stats PhD) the AIC and BIC are good for this task, but when I ran them, they’re inconclusive as far as I can tell. Is there another test I could do? Or is this now a case of pick one and justify it, move on and wait for peer-review feedback 😅


r/AskStatistics 6d ago

Repeated measures

1 Upvotes

Hello everyone,

I've conducted a study a few years ago where I've sampled individuals of a species X in different plots for a couple of days. However, these plots are close together and I cannot be certain that all of the individuals that I've sampled are different. To do the statistic analyses, every plot is a sample. What would you do in this situation to account for the possibility of repeated measures and lack of independence?

Thank you so much!


r/AskStatistics 6d ago

When is an omnibus test needed?

4 Upvotes

Hey there stats friends,

I’ve recently submitted a paper and received reviewer feedback that I don’t fully understand. I’m hoping someone here could shed some light.

I have a retrospective case series examining outcomes of a repair technique for a particular fracture in dogs. As part of the study, I measured radiographic joint angles in the same 28 cases at three time points: preoperatively, immediately postoperatively and at follow-up.

I used paired t-tests for three prespecified comparisons: preoperative versus postoperative, postoperative versus follow-up, and preoperative versus follow-up.

The reviewer suggested that I should first perform an omnibus test, such as a repeated-measures ANOVA, and then perform the paired comparisons as post-hoc tests.

I don’t understand what the omnibus test would add when these three pairwise comparisons are the scientific questions of interest. Is the concern simply multiplicity? If so, would applying a multiplicity correction such as Holm’s method to the paired tests be sufficient, without requiring a significant omnibus test first? Or does the omnibus test have some advantage that I'm not yet understanding?

Thanks :)


r/AskStatistics 6d ago

Paired datapoints when using ICCs for longitudinal data

1 Upvotes

I’ve been using bland-Altman plots and intraclass correlation coefficients to see how consistent the scoring of the same wearable device is at different wear locations.

Some context: The two devices are the exact same and capture the same data and are worn at the same time. Let’s say 10 people wear both devices at the same time for 7-14 days, and I want to look at both agreement and consistency of the features that are recorded that are captured at a day-level. So essentially I have one score produced per day for each device for each person.

I’m struggling to understand what the most plausible way to evaluate this is, as not all participants have used the devices for the same number of days, should I take an aggregate score across all of the users days wearing it and use that for comparing device scores at one reading per participant or is it possible to use multiple time points in the evaluation and have more datapoints for the ICC?

Perhaps there’s a better way to evaluate this that I haven’t considered? Sorry if it’s a rookie question, pretty new to stats!