Questions tagged [statistics]

Consider whether your question would be better asked at https://stats.stackexchange.com. Statistics is the mathematical study of using probability to infer characteristics of a population from a limited number of samples or observations.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Statistics and R: Ideas on how to find a fitting model, Shot Result depending on Shot Distance [closed]

This is mostly a statistical question that i want to solve using R. Probably missing the very simple solution. I am evaluating sports data and i have a dataset of shots (approx. 80k), basically the ...
LesGrossman's user avatar
-1 votes
0 answers
13 views

How to implement filtering the views in Flutter?

I'm developing a flutter app that lists some data. Now I want to filter them based on dates, week, month, year , lifetime like this, But can't figure out how it is done. I already did custom date ...
valen_1105's user avatar
0 votes
0 answers
19 views

Get a sample mean way bigger than the distribution mean provided to numpy.random.lognormal

For a risk analysis class project, I am trying to make a scatterplot for two lognormaly distributed variables. I tried to get a sample lognormaly distributed with numpy.random.lognormal( mean, StdDev, ...
aezsmgfjf's user avatar
0 votes
0 answers
16 views

Mediation analysis with mma() package in R error: Error in Anova.III.LR.glm(mod, singular.ok = singular.ok)

I am trying to run a mediation analysis with multiple parallel mediators using the mma() package in R. However, every time I try to run my code below, I am getting an error: library(mma) vcsqi <- ...
Mohamad El Moheb's user avatar
0 votes
0 answers
9 views

What is best way way mean median or mode?

I have a range of lead time from start to end of the activities. I am now trying to show to management the average time the department takes. Which is better at presenting the lead time: mean, median ...
anali's user avatar
  • 57
0 votes
0 answers
33 views

cannot allocate memory in static R regression

I'm trying to run a regression in R and I want to control the fipsmerg variable by factors but R gives me a memory error. input: myprobit <- glm(a_imt~a_imt_1+totpop+reltrad_1+reltrad_2+reltrad_3+...
Tiago Santos's user avatar
0 votes
0 answers
17 views

Calculating Chao-Shen corrected Jensen-Shannon Divergence

I am trying to calculate JS divergence of two distributions P and R with Chao-Shen correction (https://link.springer.com/article/10.1023/a:1026096204727). P and R are simple arrays where each element ...
ridul's user avatar
  • 1
0 votes
0 answers
13 views

How do I interpret a cox proportional hazard model? [migrated]

I fitted a cox proportional hazards model in R using the coxph(). My explanatory variables include; gender, residence, antenatal care, tetanus injection, iron tablets, size at birth, place of delivery ...
Sammywills's user avatar
-1 votes
0 answers
37 views

Why not to use typical time-series methods (STL ARIMA etc.) methods for counts?

Why should one not use the typical time-series model based methods for modeling or forecasting count values? Example: If we have count of number of customer calls per day. Its a "count" time ...
sbs0202's user avatar
  • 135
0 votes
0 answers
5 views

Sample space for combinations versus permutations

A bag contains 3 toys: 1 yellow, 1 green, and 1 orange. An experiment involves taking 1 toy from the bag, replacing it, and drawing a second toy. I'm confused as to how I describe the sample space ...
Hikiki Me's user avatar
0 votes
0 answers
49 views

How to draw a normal distribution with only integer values within a set range

I am trying to draw a normal distribution with only integers within a range. I tried reading other posts here in stackoverflow, although some are somewhat related, I still can't find the answer. I ...
Victor Shin's user avatar
0 votes
0 answers
19 views

Rstatix: pairwise_chisq_test_against_p must sum to 1

I am trying to use the pairwise_chisq_test_against_p() function from the Rstatix package. I am doing this for a large dataset, where it mostly works fine, but I get the following error: Error in ...
Graeme Frost's user avatar
  • 2,468
0 votes
0 answers
32 views

Replicating statsmodels.OLS mean squared error with scipy.stats.linregress

Is it possible to replicate the mean squared error of residuals from statsmodels.OLS using the stats.linregress? Please see my dataset with two regressions below. I can manually replicate the result ...
Hasek's user avatar
  • 209
0 votes
0 answers
19 views

KL divergence corrected for limited sample size bias

I have a reference distribution R from which I am sampling to create distributions of different sample sizes. These new distributions are of same dimensions but with different numbers of data points. ...
ridul's user avatar
  • 1
1 vote
1 answer
22 views

Issue regarding Triangular Distribution Function calculation

The daily demand for gasoline in a metropolitan area is best modeled according to the Triangular distribution between 1.25 million and 2.05 million gallons, and with a peak (mode) of 1.85 million ...
Abhishek's user avatar
0 votes
0 answers
20 views

How to explain these scatterplot relationship? [closed]

How can i describe the relationships between these 4 variables and their relation I cant seem to figure it out I only see linear relation with lstat and tax on first image. crim: per capita crime rate ...
MikeGator's user avatar
-2 votes
1 answer
35 views

find linear ascending pattern in set of data [closed]

I want to find a linear pattern in set of data, which are stored in list of tuples, for example: data = [ (1, 726), (2, 709), (3, 706), (4, 715), (5, 730), (6, 662), (7, 631), (8, 664), (9, 635), (...
mik.ro's user avatar
  • 4,409
-1 votes
0 answers
13 views

R gives me a weird error for a Synth dataprep (n duplicte unite.variable.names)

I want to prepare a data sheet for a synthetic control analysis but my data sheet is not getting accepted. When I try to run the dataprep command it tells me: " n duplicate unit.variable.names ...
JCEhrler's user avatar
0 votes
2 answers
45 views

How to use !!sym when performing a shapiro_test on a dataframe undergoing a for loop?

I am trying to loop through a dataframe and run both statistical summaries, tests and graph a plot by looping through certain columns within the dataframe. I am new to for loops in r, and sort of ...
JLit98's user avatar
  • 17
1 vote
1 answer
32 views

Recommenderlab: Predict by UBCF binary rating matrix

In recommenderlab R package, on predicting UBCF based on binary rating matrix, why does the script do crossprod between knn (k nearest neighbors) similarities and new input binary ratings for the ...
John Danson's user avatar
0 votes
0 answers
12 views

How should the maximum mean percent change from baseline be calculated?

A colleague and I are debating how to calculate the maximum mean percent change from baseline (PCFB) for a set of data. I believe the correct way is as follows: Identify the baseline value for each ...
jsgraydon's user avatar
  • 222
0 votes
1 answer
32 views

Dropping perfect prediction cases (groups based on a categorical variable) before running probit

I have a bunch of categorical variables as predictors for which I use the factor notation i.year for example. There are a few years (with a bunch of observations) that predict the outcome exactly. ...
user917983's user avatar
0 votes
0 answers
32 views

Can Kernel Density Estimation be used to smooth 3D data?

I'm aware that KDE can be used to estimate the density of points in any number of dimensions. For example, if I use the sklearn implementation in python, I can simply feed in 3D data, fit the KDE ...
ThisRandomEngineer's user avatar
1 vote
1 answer
26 views

ETS models with standard deviation and confidence interval in fitted values

I applied a ETS model to this time series. I need to have the standard deviation and confidence interval in the fitted values. import os import numpy as np import pandas as pd import datetime as dt ...
TheonofAlexandria's user avatar
0 votes
1 answer
26 views

How to calculate t-test for the difference of means to assess which algorithm achieves higher F1 score?

I am working on a project in which my expected outcome is which classifier has performed very well on the basis of F1 Score. I am conducting a t-test for the difference of means to assess which ...
Haseeb Tariq's user avatar
0 votes
0 answers
22 views

Creating Tables for Publication and PhD Thesis Using R (Health Scicence) [closed]

I'm a PhD researcher in health sciences with a moderate amount of experience using R, mostly for making figures, running regression models and other data analysis. I've never used R to make tables for ...
CJR1995's user avatar
-1 votes
1 answer
13 views

Handling Level Changes for Prophet Predictions

I have a dataset like so: It is seasonal data, but there is a level shift after some point I want Prophet to adapt to the data after the level shift faster. How can I do this? I've read through the ...
nz_21's user avatar
  • 6,222
-1 votes
0 answers
8 views

Log transform can it be used only on specific skewed columns of the Dataset [closed]

Log transform can it be used only on specific skewed columns of the Dataset My confusion here is that only certain columns are Highly Skewed/High Variability. I will be running models and PCA on the ...
Shreyas Sinha's user avatar
0 votes
1 answer
33 views

How to evaluate the performance of Machine Learning classifiers using Python by using Paired t-test?

I am quite beginner in machine learning. I am trying to conduct a t-test for the difference of means to assess which algorithm achieves higher F1 score. I have results of both algorithms Such as ...
Haseeb Tariq's user avatar
0 votes
0 answers
4 views

Which statistical test to use for microbiome analysis - PERMANOVA/PERMDISP/Something Else?

My apologies in advance, I am not a statistician and do not know much about advanced statistical analysis. Study Design: I am trying to compare microbiome from two sites, let's say, palm and elbow.I ...
Macrobiome's user avatar
1 vote
1 answer
49 views

Correlation R between categoric and binary variables

I want to use the data attached to see i there is correlation between a bootcamp that students attended and the job they end up getting. For example, does someone who attended a software engineering ...
Max's user avatar
  • 25
-2 votes
3 answers
93 views

Calculate the std dev in python

I have the following list: daily_climb = [30, 21, 33, 77, 44, 45, 23, 45, 12, 34, 55] Which represents in cm the daily climb of a snail. The snail reaches the top of the well at 125cm Every night, ...
Capybara69's user avatar
0 votes
0 answers
4 views

I keep getting invalid number of 'breaks' even though I followed what the R script said? (Posit Cloud)

>table(animal$animal.type) >adultdogs <- adult[adult$animal.type == "dog",] >hist(adultdogs$weight,main="Weight of Adult Dogs",xlab="Weight") >adultcats &...
millie4646's user avatar
-1 votes
0 answers
22 views

Error in R while making first column as row name [duplicate]

I am reading a file in R and trying to make first column as row names but getting an error in R; >betaval <- read_csv("betas_1.csv") > names(betaval)[1] <- "" ...
bioinfonext's user avatar
1 vote
2 answers
33 views

Simulating correlated reaction times and accuracies in R

I would like to simulate reaction times and accuracies with a certain correlation among them. This is my first guess: n <- 2000 RTs <- brms::rshifted_lnorm(n, meanlog = log(1.3), sdlog = 0.1, ...
Michele Scandola's user avatar
0 votes
0 answers
13 views

If Hive support column statistics about histogram?

I got information about Hive column statistics from doc and code, but when i try got column statistics, i can not find field histogram. What's the reason for this, my Hive version is 3.1.0. On hive ...
mkm's user avatar
  • 11
4 votes
2 answers
79 views

Finding quantile numerically in R

I'm looking for an R code that would help me find the quantile when the pdf is given numerically. That is, say my data is x = c(0.00,0.05,0.10,0.15,0.20,0.25,0.30,0.35,0.40,0.45,0.50,0.55,0.60,0.65,0....
EM823823's user avatar
  • 163
0 votes
0 answers
11 views

Should I use negative binomial GAM? [migrated]

I'm trying to model a data of presence and absence of birds in nest boxes. I look whether it's zero-inflated and it gave me this: Observed zeros: 36 Predicted zeros: 40 Ratio: 1.11 Is ...
Hari Tsivlin's user avatar
1 vote
0 answers
27 views

Understanding the significance level of a confidence interval [migrated]

I generated 1000 confidence intervals with 95% significance level and I am testing H0: μ = 0 vs H1: μ != 0. What means if 97.5% of my confidence intervals have the 0 included? It should be exactly 95% ...
John hall's user avatar
0 votes
1 answer
19 views

Properly accounting for cluster effects in survey-weighted logistic regression?

I have a dataset with person-specific survey weights which I am using to predict the probability of cigarette smoking. The survey works in such a way that all participants of randomly sampled ...
K M's user avatar
  • 3
0 votes
0 answers
30 views

Correlation among 10 binary variables [migrated]

I have a dataset like this: All these social determinants are binary variable. How can I find the correlation among them? By chisq.test? Since I have 11 variables and it will be 55 pairs. Is there ...
Louis's user avatar
  • 7
0 votes
0 answers
13 views

Nlme models seem to converge, but `intervals()` throws an error

I have the following two intercept model in nlme: com_rel_3 <- lme (fixed = relsat ~ -1 + Mann + Frau + Mann:M_comfort_cw + Mann:F_comfort_cw + ...
Boomington's user avatar
0 votes
2 answers
33 views

Find four of a kind through simulation in r

There is something off about my function and I am not sure what it is.... any help would be greatly appreciated #Create a deck of cards suits <- c("Diamonds", "Clubs", "...
Shingi's user avatar
  • 3
0 votes
1 answer
22 views

How to perform Dickey Fuller with adf.test() with .txt data?

How can I perform a Dickey Fuller in R with adf.test() with this PS1.txt data? I got this error: adf.test(data2) Fehler in adf.test(data2) : x is not a vector or univariate time series Please help ...
AMoz's user avatar
  • 21
-1 votes
3 answers
21 views

what is hypothesis testing?

p-value? parameter tests? I tried to solve it but I couldn’t. An online retail company performed an A/B test to check whether changing the size of the cart icon increases the expected number of items ...
Madmax7's user avatar
0 votes
0 answers
4 views

Ftest function vs linest function in excel

I was confused why the f-test from Ftest function and linest are different when i was trying to do a f-test in excel. Can someone help me explain what is the difference between the two functions? Not ...
Mini PP's user avatar
-1 votes
0 answers
13 views

Does this type of analyses make any sense?

I have a dataset with basically three classes and counts: NOT AVAILABLE: 258 DONE: 69 IN PROGRESS: 11 And my dataset is basically: STATUS INV_VALUE DONE 4000,2 DONE 12345,6 NOT AVAILBLE 666,666 ...
Sandro A.'s user avatar
0 votes
0 answers
24 views

KNN IN r: NA/NaN/Inf in foreign function call (arg 6)

I´ve been studying the KNN algorithm to use in prediction of sentence(law), studying torought this link: https://www.datascienceforlawyers.org/learning-resources/lesson-8/ where in this piece of code ...
ThiagoM's user avatar
  • 72
0 votes
1 answer
60 views

Function loop for creating and saving advanced statistical barplot (gglot) with dependence of response variable

I would like to create and save advanced statistical barplot with help of loop function. I would like to change response variable for statistical analyses (using loop), names of y axis and maximum ...
Baltazár Tivadar's user avatar
0 votes
1 answer
29 views

Does it possible to make histogram in R but the x axis value is in decimal. and pre-determined manually

I want to make a histogram where there are range with decimal on the x axis, does it possible? data=c(321.68 , 329.51 , 327.89 , 291.97 , 303.26 , 297.18 , 466.74, 251.75 , 327.12 , 283....
Marsello Ormanda's user avatar

1
2 3 4 5
327