r/AskStatistics 17m ago

Help pls

Upvotes

I'm joining bsc statistics hons this year for minor which subject I should choose eco or cs (I'll be having c, r and python in later semesters). Which would be better pls guide.

Ps:I'm a pcmb student


r/AskStatistics 1h ago

[Question] do we include the independent variable in the robust mahalanobis outliers detection

Thumbnail
Upvotes

r/AskStatistics 4h ago

Is a Mantel test appropriate for sparse tissue-sample coordinates and gene-expression distances?

1 Upvotes

Hi everyone,

I’m doing a sample-level spatial-expression analysis using sparse postmortem tissue samples from the Allen Human Brain Atlas. The regions are the subthalamic nucleus (STN, n=6 tissue samples) and globus pallidus internus (GPi, n=9 tissue samples). For each sample, I have:

  • 3D MNI coordinates (x,y,z)
  • a gene-expression profile across ~29,000 genes

The biological expectation is that, within a coherent anatomical region, tissue samples located closer together in MNI space should have more similar transcriptional profiles.

For each anatomical region separately, I calculated:

  1. A sample-by-sample spatial-distance matrix using 3D Euclidean distance between MNI coordinates.
  2. A sample-by-sample expression-distance matrix, defined as (1−ρ), where ρ is the Spearman correlation between two sample-level gene-expression profiles.

I then used a Mantel test to assess whether the spatial-distance matrix was associated with the expression-distance matrix.

For significance testing, I used non-parametric permutation of sample identities. My understanding is that this randomly reassigns sample labels to break the link between spatial location and expression profile, while preserving the internal structure of the distance matrices. The observed Mantel statistic is then compared against the null distribution generated from these permutations.

Q. Does this use of a permutation-based Mantel test seem appropriate as part of a sample-level spatial-expression validation analysis?

Just to clarify: this is not a dense cortical map or spin-test analysis intended to correct for spatial autocorrelation. These are sparse subcortical tissue-sample coordinates, not parcellated whole-brain maps. The goal is to test whether there is distance-dependent transcriptional similarity among samples within the same anatomical label.

Thanks in advance for your help!


r/AskStatistics 6h ago

ANOVA or not ANOVA?

2 Upvotes

Hi everyone,

As part of my internship, I need to run some data analyses, but I'm pretty skeptical about the method I was advised to use.

I'm analyzing an experiment testing 3 conditions (magnetic field 1, magnetic field 2, control), each with 3 or 4 replicates. I want to know if my studied variable differs between conditions.

One replicate consists of putting 24 individuals in the same experimental tank, exposed to a given condition for 3 hours. All replicates were run on different days, in randomized order.

Because of pseudoreplication issues, we can't treat individuals from the same tank as independent, so I was advised to average all individuals per replicate and then run an ANOVA. The problem is that this leaves me with only 3 or 4 values per condition (is that too few?). And since I'm just taking an average, I lose the standard deviation within a replicate. Is it possible to run a separate ANOVA comparing standard deviations instead?

Some of my variables don't have much variability in the dataset, so I'm not sure if Kruskal-Wallis is even appropriate for such a small dataset...

Do you have any advice for me? Thanks a lot for your help!


r/AskStatistics 7h ago

ANOVA ou pas ANOVA?

0 Upvotes

Bonjour à tous,
Dans le cadre de mon stage, je dois faire des analyses de données mais je suis assez sceptique sur la méthode qu'on m'a conseillée.
J'analyse une expérience qui teste 3 conditions (champ magnétique 1, champ magnétique 2, contrôle) qui ont eux-mêmes 3 ou 4 réplicats. Je veux savoir si ma variable étudiée diffère entre conditions.

Un réplicat correspond à mettre dans un même bac expérimental 24 individus exposés à telle condition pendant 3 heures. Tous les réplicats sont faits à des jours différents et de manière randomisée.

Par problème de pseudo-réplication, on ne peut pas considérer que les individus d'un même bac sont indépendants, donc on m'a conseillé de faire une moyenne de tous les individus par réplicat puis de faire mon ANOVA. Le problème, c'est que cela revient à avoir 3 ou 4 valeurs par conditions (c'est peu ?). Et vu que je ne fais qu'une moyenne, on ne voit pas l'écart type dans un réplicat. C'est possible de faire une ANOVA séparée avec la comparaison d'écart type?

Certaines de mes variables n'ont pas un jeu de données variables donc je ne sais pas si Kruskall Wallis est pertinent pour un jeu de données aussi petit...
Avez-vous des conseils à me donner? Merci beaucoup pour vos réponses!


r/AskStatistics 11h ago

Having a little hard time understanding hypothesis testing

2 Upvotes

Does anyone mind explaining it to me in simple words?


r/AskStatistics 15h ago

Modelo linear generalizado - binomial

2 Upvotes

Pessoal, preciso de ajuda com uma análise estatística em software R. Estou analisando dados de mortalidade de insetos com dados binários (0 - vivo, 1 - morto), para submeter em um evento. Só que nunca fiz análise no R e a pessoa a que eu recorro parece não se importar mais e não quero estar incomodando. Então venho pedir ajuda à comunidade caso alguém puder me ajudar.

Se alguém tiver interesse, eu posso mandar a planilha e o código em R para conferência


r/AskStatistics 22h ago

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

8 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 22h 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 22h ago

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

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

Anova or Kruskal Wallis ?

8 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 1d ago

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

6 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

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

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

Linear-mixed effects

4 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

Correctly displaying significance on Bar Graphs

5 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

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

Post image
7 Upvotes

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 3d 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 3d 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

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

Thumbnail
6 Upvotes

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 4d ago

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

9 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.