id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_77493397 | stackoverflow | DATA_SCIENCE | What is the most appropriate statistical test to check for significant differences in growth rates? | What is the most appropriate statistical test to check for significant differences in growth rates?
I have a commercial performance dataset such as the following:
Client Type
Channel
%growth_vol
Big Retail
A
9%
Big Retail
B
7%
Mid Retail
A
11%
Mid Retail
B
18%
Small Retail
A
21%
Small Retail
B
16%
... | https://stackoverflow.com/questions/77493397/what-is-the-most-appropriate-statistical-test-to-check-for-significant-differenc | python-3.x, statistics, cluster-analysis, t-test | 1,700,124,730 |
se_77483099 | stackoverflow | DATA_SCIENCE | How to score the consistency of angles? | How to score the consistency of angles?
I'm averaging angles by averaging their coordinates after placing them on a unit circle. I read that the length of the resulting point or centroid/center of mass is an indicator of the consistency of these angles. This makes sense in my head, that two exactly opposite angles wou... | https://stackoverflow.com/questions/77483099/how-to-score-the-consistency-of-angles | algorithm, math, statistics, geometry, trigonometry | 1,699,987,335 |
se_61605867 | stackoverflow | DATA_SCIENCE | Is there critical F-Value look up with scipy or other library? | Is there critical F-Value look up with scipy or other library?
Scipy Stats comes with an ANOVA test f_oneway() that returns a p-value and a F-score. The p-score easily tells you if your test passes or fails simply by comparing it to your alpha threshold, which can be chosen arbitrarily small to make the test stricter.... | https://stackoverflow.com/questions/61605867/is-there-critical-f-value-look-up-with-scipy-or-other-library | python, scipy, statistics, scipy.stats | 1,588,653,350 |
se_8155652 | stackoverflow | DATA_SCIENCE | Best way to track (direct) file downloads | Best way to track (direct) file downloads
What is the best method to track direct file downloads?
Google Analytics only works with javascript, can't track direct file downloads.
Best would be a secure and own hosted solution. | https://stackoverflow.com/questions/8155652/best-way-to-track-direct-file-downloads | php, html, apache, .htaccess, statistics | 1,321,463,093 |
se_77484151 | stackoverflow | DATA_SCIENCE | How to simulate a data point from a beta-regression (betareg)? | How to simulate a data point from a beta-regression (betareg)?
R beginner here!
I have question regarding the beta-regression respectively the "betareg" model in R.
I want to simulate a data point from the beta-regression for one value (temp 300).
I should test my resulting conversion by first simulating 10 data point... | https://stackoverflow.com/questions/77484151/how-to-simulate-a-data-point-from-a-beta-regression-betareg | r, statistics | 1,700,000,088 |
se_77473716 | stackoverflow | DATA_SCIENCE | Issue with TableOne and gtsummary when Handling Small Values in Variables | Issue with TableOne and gtsummary when Handling Small Values in Variables
Good evening!
I'm currently encountering a challenge with TableOne (and gtsummary) when attempting to create a table with variables of very small orders of magnitude, such as e−8e−8. It seems that TableOne is treating these values as zero due to... | https://stackoverflow.com/questions/77473716/issue-with-tableone-and-gtsummary-when-handling-small-values-in-variables | r, statistics | 1,699,876,589 |
se_77484516 | stackoverflow | DATA_SCIENCE | 'mixed' and 'lmer' in R provide different estimates for variable coefficients | 'mixed' and 'lmer' in R provide different estimates for variable coefficients
I was fitting mixed-effects models in a longitudinal dataset and noticed that specifying the same structure led to different outputs depending on if I used 'mixed' (from package afex) or lme4. I have provided reproducible cod... | https://stackoverflow.com/questions/77484516/mixed-and-lmer-in-r-provide-different-estimates-for-variable-coefficients | r, statistics, mixed-models, r-package | 1,700,006,771 |
se_77477813 | stackoverflow | DATA_SCIENCE | geom_signif() overlaps asterisks/stars when manually plotting on a cluster bar graph? | geom_signif() overlaps asterisks/stars when manually plotting on a cluster bar graph?
I created a dataframe that contains my asterisks and details to show statistics on the graph:
#this is index_df dataframe
xmin xmax y sym
0.8 1.2 4.5 *
0.8 1.8 5.5 ****
1.2 2.2 6.5 *
1.8 2.2 4.5 *
And i apply it the the ba... | https://stackoverflow.com/questions/77477813/geom-signif-overlaps-asterisks-stars-when-manually-plotting-on-a-cluster-bar-g | r, ggplot2, statistics, annotations, bar-chart | 1,699,927,539 |
se_77484679 | stackoverflow | DATA_SCIENCE | How to go from standard deviation to standard error in python least_squares fit? | How to go from standard deviation to standard error in python least_squares fit?
I am not proficient in statistics. Following a thread: How to compute standard deviation errors with scipy.optimize.least_squares, I got my std to be
std = np.sqrt(np.diagonal(np.linalg.inv(J.T @ J) * (res_lsq.fun.T @ res_lsq.fun / (res_l... | https://stackoverflow.com/questions/77484679/how-to-go-from-standard-deviation-to-standard-error-in-python-least-squares-fit | python, error-handling, statistics, curve-fitting, least-squares | 1,700,010,485 |
se_77380283 | stackoverflow | DATA_SCIENCE | Hypothesis testing - Newbie blockers | Hypothesis testing - Newbie blockers
Brief : I'm from manufacturing industry, a processing machine in our production line used to do pressing, polishing and QA in one line. Now we have a new machine that will perform these separately at the same time. Ideally the new machine will be better than the old machine. I want... | https://stackoverflow.com/questions/77380283/hypothesis-testing-newbie-blockers | statistics, normal-distribution, resampling, hypothesis-test | 1,698,510,331 |
se_77482817 | stackoverflow | DATA_SCIENCE | Getting the total mean brightness deviation of multiple images | Getting the total mean brightness deviation of multiple images
I'm working with a camera and acquiring images to analyze. I'm trying to get the following information:
Get mean brightness and brightness standard deviation per single picture
Get mean brightness and brightness standard deviation per n pictures
My code ... | https://stackoverflow.com/questions/77482817/getting-the-total-mean-brightness-deviation-of-multiple-images | python, image-processing, statistics | 1,699,984,444 |
se_77472549 | stackoverflow | DATA_SCIENCE | Calculating variance accurately in Python | Calculating variance accurately in Python
I am calculating variance of list A which contains many sublists. However, the output is different from a mathematical calculation. Why is that? I present the current and expected output.
import statistics
A = [[2], [7], [3], [12], [9]]
# Flatten the sublists to get a single... | https://stackoverflow.com/questions/77472549/calculating-variance-accurately-in-python | python, list, statistics | 1,699,863,874 |
se_73771152 | stackoverflow | DATA_SCIENCE | Finding deviation of coordinates placed on boundaries of a rectilinear shape | Finding deviation of coordinates placed on boundaries of a rectilinear shape
I have elements placed on boundary of a rectilinear shape as depicted in the diagram. The intention is to find a metric (like for e.g. avg, std. deviation) which gives me how well the elements are clubbed together or separated throughout (as ... | https://stackoverflow.com/questions/73771152/finding-deviation-of-coordinates-placed-on-boundaries-of-a-rectilinear-shape | statistics, polygon, scatter-plot, computational-geometry, coordinate-systems | 1,663,578,987 |
se_26778482 | stackoverflow | DATA_SCIENCE | Confusion regarding difference of machine learning and statistical learning algorithms | Confusion regarding difference of machine learning and statistical learning algorithms
I have read these lines in one of the IEEE Transaction on software learning
"Researchers have adopted a myriad of different techniques to construct software fault prediction models. These include various statistical techniques such ... | https://stackoverflow.com/questions/26778482/confusion-regarding-difference-of-machine-learning-and-statistical-learning-algo | machine-learning, statistics | 1,415,273,646 |
se_77465590 | stackoverflow | DATA_SCIENCE | problem with using SQL CTE function inside prestashop | problem with using SQL CTE function inside prestashop
I have a problem with using WITH function (CTE) in prestashop 1.7.6.9 to make additional features in stats.
My original PHP code (works fine):
$this->query = 'SELECT SQL_CALC_FOUND_ROWS p.reference, p.id_product, pl.name,
ROUND(AVG(od.product_price / o.... | https://stackoverflow.com/questions/77465590/problem-with-using-sql-cte-function-inside-prestashop | php, sql, statistics, prestashop, common-table-expression | 1,699,714,678 |
se_77426635 | stackoverflow | DATA_SCIENCE | Plotting the harmonic as a perturbation of the mean | Plotting the harmonic as a perturbation of the mean
I'm currently trying to plot the first and second harmonic (as depicted in Ramsay - FDA with R and MATLAB). Ideally, it should look like the image bellow -
So far, this is the set up I've got -
handpartx <- handwrit[,,1]
handparty <- handwrit[,,2]
curv.Lfd <- int2Lf... | https://stackoverflow.com/questions/77426635/plotting-the-harmonic-as-a-perturbation-of-the-mean | r, statistics | 1,699,199,969 |
se_59047981 | stackoverflow | DATA_SCIENCE | File size statistics for file sharing sites | File size statistics for file sharing sites
I'm currently developing a file sharing platform and I would like to make my stress tests as realistic as possible. To do that I need to generate a lot of test files, and to do that in the most realistic manner, I need to know how the sizes of files uploaded to such a servic... | https://stackoverflow.com/questions/59047981/file-size-statistics-for-file-sharing-sites | file, testing, statistics | 1,574,761,529 |
se_67020730 | stackoverflow | DATA_SCIENCE | Why summary a linear model in R does not show all the needed levels? | Why summary a linear model in R does not show all the needed levels?
I am trying to do a linear model in R. I have 24 experiments (complete factorial analysis). I have 3 factors on this model. However, the Density factor has 3 levels (B, M, A). I know that DensityB is not needed to be appeared because if the DensityM ... | https://stackoverflow.com/questions/67020730/why-summary-a-linear-model-in-r-does-not-show-all-the-needed-levels | r, statistics, refactoring, linear-regression, interaction | 1,617,969,517 |
se_58544118 | stackoverflow | DATA_SCIENCE | Is there a .fit function for discrete distributions in scipy stats? | Is there a .fit function for discrete distributions in scipy stats?
I am trying to .fit a Poisson distribution to calculate a MLE for my data. I noticed there is a .fit for continuous functions in scipy stats, but no .fit for discrete functions. Is there another API that has a .fit function for discrete distributions ... | https://stackoverflow.com/questions/58544118/is-there-a-fit-function-for-discrete-distributions-in-scipy-stats | python, scipy, statistics, mle | 1,571,929,312 |
se_51515423 | stackoverflow | DATA_SCIENCE | Generate sample data with an exact Mean and Standard Deviation | Generate sample data with an exact Mean and Standard Deviation
I wanted to create a data set with a specific Mean and Std deviation.
Using np.random.normal() gives me an approximate. However for what I want to test I need an exact Mean and Std deviation.
I have tried using a combination of norm.pdf and np.linspace... | https://stackoverflow.com/questions/51515423/generate-sample-data-with-an-exact-mean-and-standard-deviation | python, statistics, dataset | 1,532,510,817 |
se_48063038 | stackoverflow | DATA_SCIENCE | Calculate raster landscape proportion (percentage) within multiple overlaping polygon (shapefiles)? | Calculate raster landscape proportion (percentage) within multiple overlaping polygon (shapefiles)?
I think the easiest way is to extract the raster values within each polygon and calculate the proportion. Is it possible to do so without reading the entire grid as an array?
I have 23 yearly global classified raster (... | https://stackoverflow.com/questions/48063038/calculate-raster-landscape-proportion-percentage-within-multiple-overlaping-po | statistics, classification, polygon, raster, qgis | 1,514,904,557 |
se_77463360 | stackoverflow | DATA_SCIENCE | Python: Mac Os error importing statistics module | Python: Mac Os error importing statistics module
I was working with Visual Studio Code on windows and wanted to try in Mac Os, installed succesfully VSCode but at the time of trying to import the statistics module an error says that: No module named statistics found.
import math
import statistics as st
mean = st.mean... | https://stackoverflow.com/questions/77463360/python-mac-os-error-importing-statistics-module | python, macos, module, statistics | 1,699,659,851 |
se_77461704 | stackoverflow | DATA_SCIENCE | predicting true path of data fitted to bezier curve | predicting true path of data fitted to bezier curve
I have a set of data (x-y GPS points) that represent traversing a well-defined path multiple times. I want to statistically predict the true location of the path and estimate how accurate the prediction is. I have ordered the data and then fit it to a cubic Bezier cu... | https://stackoverflow.com/questions/77461704/predicting-true-path-of-data-fitted-to-bezier-curve | matlab, statistics, prediction, parametric-equations | 1,699,635,797 |
se_74848880 | stackoverflow | DATA_SCIENCE | How to create Histogram using ggplot2 that uses 2 variables (year and income) and puts then on x and y axes separately? | How to create Histogram using ggplot2 that uses 2 variables (year and income) and puts then on x and y axes separately?
I am having issues with creating histogram using 2 variables in R. The things is that I need to plot a histogram with 2 variables- year and income, that I take from my dataset. I need to plot the his... | https://stackoverflow.com/questions/74848880/how-to-create-histogram-using-ggplot2-that-uses-2-variables-year-and-income-an | r, statistics, histogram | 1,671,444,036 |
se_61506484 | stackoverflow | DATA_SCIENCE | How to normalise data for a k-s test? | How to normalise data for a k-s test?
I have two numpy arrays which have different sizes and I want to run a k-s test on them, but before I do this I need to normalise them. Is the any way to do this? The arrays I have are similar to the ones below:
size1 = array1.size
print(size1)
120
size2 = array2.size
print(s... | https://stackoverflow.com/questions/61506484/how-to-normalise-data-for-a-k-s-test | python, numpy, scipy, statistics, stat | 1,588,176,947 |
se_52129388 | stackoverflow | DATA_SCIENCE | How to perform p-value adjustment in python( Mann-Whitney U test) | How to perform p-value adjustment in python( Mann-Whitney U test)
I have 2 one-dimensional lists of values. I need to perform Mann-Whitney U test (Mann-Whitney-Wilcoxon) for them. That is my workflow in python:
import pandas
from scipy.stats import mannwhitneyu
mannwhitneyu(x, y)
That gives me p-value. My proble... | https://stackoverflow.com/questions/52129388/how-to-perform-p-value-adjustment-in-python-mann-whitney-u-test | python, pandas, scipy, statistics, adjustment | 1,535,814,392 |
se_77453793 | stackoverflow | DATA_SCIENCE | Assessing the impact of one variable on multiple others | Assessing the impact of one variable on multiple others
I have a dataset of patients with multiple parameters recorded, such as glucose, diabetes, O2 concentration, etc. I want to check whether glucose levels are in any way associated with other parameters. All variables in the data set are either continuous or binary... | https://stackoverflow.com/questions/77453793/assessing-the-impact-of-one-variable-on-multiple-others | statistics | 1,699,538,487 |
se_77454874 | stackoverflow | DATA_SCIENCE | Ljung_box test and its interpretation | Ljung_box test and its interpretation
I don't understand how to obtain a single test statistic Q and a single p-value, as it happens in software like Gretl, instead of getting all the statistics for each lags.
lb_test = acorr_ljungbox(residuals, lags=10)
print(lb_test)
the output is:
lb_stat lb_pvalue
1 0.5... | https://stackoverflow.com/questions/77454874/ljung-box-test-and-its-interpretation | python, statistics, autocorrelation, arch, gretl | 1,699,547,518 |
se_77450082 | stackoverflow | DATA_SCIENCE | Conditional probability code not working in R | Conditional probability code not working in R
Consider a game which involves rolling three dice
calculate outcomes and the probability of that event.
#sample space
install.packages("combinat")
library(combinat)
install.packages("https://cran.r-project.org/src/contrib/Archive/prob/prob_0.9-2.tar.gz", repos = NULL, depe... | https://stackoverflow.com/questions/77450082/conditional-probability-code-not-working-in-r | r, statistics | 1,699,496,410 |
se_66064075 | stackoverflow | DATA_SCIENCE | Problems with calculating 95% confidence interval using scipy.stats library | Problems with calculating 95% confidence interval using scipy.stats library
I need to calculate p-value, ods ratio and 95% confidence interval for matrix 2x2 usin python. I found scipy.stats library
import scipy.stats as stats
v = [[8, 2], [1, 5]]
oddsratio, pvalue = stats.fisher_exact(v)
print(pvalue, oddsratio, se... | https://stackoverflow.com/questions/66064075/problems-with-calculating-95-confidence-interval-using-scipy-stats-library | python, python-3.x, scipy, statistics | 1,612,531,522 |
se_49056143 | stackoverflow | DATA_SCIENCE | Export of repeated tables in R | Export of repeated tables in R
I need to do an "automatic", repeated analysis (loop analysis?) that can be easily exported.
I have to analyze a satisfaction survey that includes many sentences. Every participant will answer with a number system from 1 (I am not at all satisfied) to 5 (I am very satisfied).
Each stat... | https://stackoverflow.com/questions/49056143/export-of-repeated-tables-in-r | r, testing, printing, statistics, export | 1,519,928,008 |
se_48919084 | stackoverflow | DATA_SCIENCE | scatterplot3d I can not make a surface graph | scatterplot3d I can not make a surface graph
I'm trying to make a surface graph but I can not do it. The graphic is not pretty and I have tried in several forums how to do and I did not succeed.
library(scatterplot3d)
x1 <- rep(10, 6)
x2 <- rep(15, 6)
x3 <- rep(20, 6)
x4 <- rep(25, 6)
x5 <- rep(30, 6)
x <- c(x1, x2, ... | https://stackoverflow.com/questions/48919084/scatterplot3d-i-can-not-make-a-surface-graph | r, statistics | 1,519,269,501 |
se_74421173 | stackoverflow | DATA_SCIENCE | How does the scipy.stats.shapiro calculate a test statistic | How does the scipy.stats.shapiro calculate a test statistic
I know that scipy.stats.shapiro is used to test for normality. I also know that the calculation of a test statistic always involves the mean m0 or variance of the population (as explained here). My question then:
What type of test statistic (t, chi-square or... | https://stackoverflow.com/questions/74421173/how-does-the-scipy-stats-shapiro-calculate-a-test-statistic | python, scipy, statistics, scipy.stats | 1,668,344,139 |
se_77443289 | stackoverflow | DATA_SCIENCE | Is there any way to write formulae using own properties we have sent while tracking in mixpanel? | Is there any way to write formulae using own properties we have sent while tracking in mixpanel?
I have a app where a hiring manager posts a job and hires job seekers.
I have placed two tracking events.
Job Hired (which will be tracked once the job seeker gets hired for a particular job)
Job Not Hired (which will be ... | https://stackoverflow.com/questions/77443289/is-there-any-way-to-write-formulae-using-own-properties-we-have-sent-while-track | events, statistics, analytics, mixpanel, event-tracking | 1,699,425,575 |
se_77443205 | stackoverflow | DATA_SCIENCE | Target leak in Customer Churn Model | Target leak in Customer Churn Model
I am working on a customer churn model and I have a few doubts to confirm if there is a target leak or not due to certain features. Please, find the details below:
Customer base: Live as of Dec'22
Response (Target) definition: Customers dropping their bank balances by 60% or more in... | https://stackoverflow.com/questions/77443205/target-leak-in-customer-churn-model | input, statistics, prediction, feature-selection, data-science-experience | 1,699,424,455 |
se_68149265 | stackoverflow | DATA_SCIENCE | P value and critical value in hypothesis testing | P value and critical value in hypothesis testing
I need little clarification in p value and critical value approach in hypothesis testing regarding below example.
Null Hypothesis : population mean = 80
Alternative : population mean != 80
sample_mean = 78
sample_std = 2.5 n = 40
after calculating Z statistic that g... | https://stackoverflow.com/questions/68149265/p-value-and-critical-value-in-hypothesis-testing | python, statistics, scipy.stats | 1,624,782,057 |
se_64886254 | stackoverflow | DATA_SCIENCE | Why are randomly-generated distributions from numpy.random and scipy.stats so different that their probabilities don't sum properly? | Why are randomly-generated distributions from numpy.random and scipy.stats so different that their probabilities don't sum properly?
When randomly generating random numbers using the numpy.random package, and the scipy.stats package, why is the histogram (total probabilities) generated by the former package have s... | https://stackoverflow.com/questions/64886254/why-are-randomly-generated-distributions-from-numpy-random-and-scipy-stats-so-di | python, numpy, statistics, probability-distribution, scipy.stats | 1,605,667,410 |
se_71988923 | stackoverflow | DATA_SCIENCE | the mean and standard deviation aren't the same as those of the input data i provided after sampling | the mean and standard deviation aren't the same as those of the input data i provided after sampling
I have a log-normal mean and a standard deviation. after i converted them to the underlying normal distribution's parameters mu and sigma, I sampled from the log-normal distribution however when i take the mean an... | https://stackoverflow.com/questions/71988923/the-mean-and-standard-deviation-arent-the-same-as-those-of-the-input-data-i-pro | python, statistics, probability-distribution, scipy.stats | 1,650,807,190 |
se_77420564 | stackoverflow | DATA_SCIENCE | I ran the exact same code twice and got different outputs | I ran the exact same code twice and got different outputs
I'm working on a simulation in R to model some human behavior and for some reason, my simulation is alternating between two different result patterns. Below is the code for the two simulations that I'm running. 10000 iterations should be sufficient to converge ... | https://stackoverflow.com/questions/77420564/i-ran-the-exact-same-code-twice-and-got-different-outputs | r, statistics, simulation | 1,699,065,879 |
se_73279862 | stackoverflow | DATA_SCIENCE | How to find the argument of scipy.stats.exponnorm given certain parameters and output | How to find the argument of scipy.stats.exponnorm given certain parameters and output
My problem is as follows:
Consider two PDFs - one normal distribution (let's call it norm) , and one exponentially modified normal distribution (exponorm). Given a point X, F is the fractional ratio of the area of norm and the area o... | https://stackoverflow.com/questions/73279862/how-to-find-the-argument-of-scipy-stats-exponnorm-given-certain-parameters-and-o | python, scipy, statistics, normal-distribution, scipy.stats | 1,659,970,366 |
se_75310591 | stackoverflow | DATA_SCIENCE | How can the 2 sample K-S test be implemented in Python? | How can the 2 sample K-S test be implemented in Python?
I have a data-set of experimental data (y_observed, t whereby y_observed represents measured values and t represents the time in seconds since start of the measurement). I perform a Gaussian fitting to this data, but want to assess whether it makes sense to fit a... | https://stackoverflow.com/questions/75310591/how-can-the-2-sample-k-s-test-be-implemented-in-python | python, statistics, curve-fitting, scipy.stats, kolmogorov-smirnov | 1,675,256,637 |
se_77428610 | stackoverflow | DATA_SCIENCE | Pandas pd.cut with pd.groupby not matching loop aggregation | Pandas pd.cut with pd.groupby not matching loop aggregation
I am calculating some statistics (mean value from binned data) for a heat map. I am somewhat skeptical of the results using the pandorable method so I tried recalculating using a nested for loop and dataframe masking. The results are almost identical except f... | https://stackoverflow.com/questions/77428610/pandas-pd-cut-with-pd-groupby-not-matching-loop-aggregation | python, pandas, statistics, analysis, binning | 1,699,241,666 |
se_77426606 | stackoverflow | DATA_SCIENCE | Error in t.test for p-value calculation in R | Error in t.test for p-value calculation in R
I have a dataframe mat that has information
mat <- structure(list(ids = c("id1", "id2", "id3", "id4", "id5", "id6",
"id7", "id8", "id9", "id10", "id11", "id12", "id13", "id14",
"id15", "id16", "id17", "id18", "id19", "id20"), Group = c("A",
"A", "A", "A", "A", "B", "B", ... | https://stackoverflow.com/questions/77426606/error-in-t-test-for-p-value-calculation-in-r | r, statistics, grouping, factors, t.test | 1,699,199,499 |
se_895929 | stackoverflow | DATA_SCIENCE | How do I determine the standard deviation (stddev) of a set of values? | How do I determine the standard deviation (stddev) of a set of values?
I need to know if a number compared to a set of numbers is outside of 1 stddev from the mean, etc.. | https://stackoverflow.com/questions/895929/how-do-i-determine-the-standard-deviation-stddev-of-a-set-of-values | c#, math, statistics, numerical | 1,242,952,014 |
se_77423735 | stackoverflow | DATA_SCIENCE | Impute additional dataset 2 based on initial dataset 1 - mice package | Impute additional dataset 2 based on initial dataset 1 - mice package
I have a situation in which I have an initial dataset to which subsequent datasets will be added over time. These future datasets will need to be imputed.
Is it possible with the mice package in R to add additional rows to an imputed dataset, and i... | https://stackoverflow.com/questions/77423735/impute-additional-dataset-2-based-on-initial-dataset-1-mice-package | r, statistics, imputation, r-mice | 1,699,130,161 |
se_77418427 | stackoverflow | DATA_SCIENCE | I am doing my r hw for class and for some reason the p value showing up in the console is different than what is in my knitted document | I am doing my r hw for class and for some reason the p value showing up in the console is different than what is in my knitted document
I am data science student and I am running into an issue while doing my hw and even my professor can't figure it out.
When I use this code:
associate(Size_of_Party ~ Smoker, data = EX... | https://stackoverflow.com/questions/77418427/i-am-doing-my-r-hw-for-class-and-for-some-reason-the-p-value-showing-up-in-the-c | r, statistics, p-value | 1,699,030,189 |
se_77423274 | stackoverflow | DATA_SCIENCE | Correlation vs identity: a=b, b=c, but a != c? | Correlation vs identity: a=b, b=c, but a != c?
I analyze a dataset - the result of a survey asking people several yes/no questions. I find a moderate positive correlation (~0.5), very statistically significant, between those who answer yes to question (let's call it) a and those who answer yes to b. Similar correlatio... | https://stackoverflow.com/questions/77423274/correlation-vs-identity-a-b-b-c-but-a-c | statistics, correlation | 1,699,121,604 |
se_77362703 | stackoverflow | DATA_SCIENCE | How to plot an histogram correctly with numpy, and match it with the density function? | How to plot an histogram correctly with numpy, and match it with the density function?
TL;DR: How to plot the result of np.histogram(..., density=True) correctly with Numpy?
Using density=True should help to match the histogram of the sample, and the density function of the underlying random variable, but it doesn't:
... | https://stackoverflow.com/questions/77362703/how-to-plot-an-histogram-correctly-with-numpy-and-match-it-with-the-density-fun | python, numpy, matplotlib, statistics, probability-density | 1,698,265,776 |
se_77420205 | stackoverflow | DATA_SCIENCE | Python: Get mean and std dev from input using OOP | Python: Get mean and std dev from input using OOP
I have solved the following program to get mean and std dev from user's input, but I have the strong feeling that can be improved, mainly as I have to duplicate the split function, I had to do that because std_dev was using the mean result, so for that reason an error ... | https://stackoverflow.com/questions/77420205/python-get-mean-and-std-dev-from-input-using-oop | python, oop, statistics, mean | 1,699,054,632 |
se_77219113 | stackoverflow | DATA_SCIENCE | R KFAS Ar(1) Model | R KFAS Ar(1) Model
I am using the latest KFAS package and it's SSMarima method to build an AR(1). I followed the instruction given in this https://www.jstatsoft.org/article/view/v078i10. Below is my code snippet.
However, after running the fitSSM method, i am getting the error "Error in is.SSModel(do.call(updatefn, ar... | https://stackoverflow.com/questions/77219113/r-kfas-ar1-model | r, statistics, time-series, kalman-filter, autoregressive-models | 1,696,293,937 |
se_77412506 | stackoverflow | DATA_SCIENCE | Get statistics (q1, median q3) from count dictionary | Get statistics (q1, median q3) from count dictionary
I have a dictionary of counts like this:
{1:2, 2:1, 3:1}
I need to calculate q1, median, and q3 from this. It is pretty straight forward for odd numbered arrays but for even cases, I can't seem to figure it out.
I want to do it without using any libraries like nump... | https://stackoverflow.com/questions/77412506/get-statistics-q1-median-q3-from-count-dictionary | python, dictionary, count, statistics, quantile | 1,698,954,612 |
se_77405423 | stackoverflow | DATA_SCIENCE | Can I pick 5 numbers that add to 1 billion with equal probability without using simulation? | Can I pick 5 numbers that add to 1 billion with equal probability without using simulation?
You have 5 choices, and you want to pick from the five choices randomly.
Instead of simulating that choice 1 billion times, how would you go about getting numbers for each one directly?
This is the simulation:
choices = [0, 0, ... | https://stackoverflow.com/questions/77405423/can-i-pick-5-numbers-that-add-to-1-billion-with-equal-probability-without-using | python, performance, random, statistics | 1,698,870,498 |
se_77350417 | stackoverflow | DATA_SCIENCE | Normalize data to control from independent experiments, subjects and scales | Normalize data to control from independent experiments, subjects and scales
I need to normalize the data from several subjects with different controls that have different scales. This to find the best way to present the dataset I have.
For this normalization I have tried normalizing by the avg of each control, conside... | https://stackoverflow.com/questions/77350417/normalize-data-to-control-from-independent-experiments-subjects-and-scales | statistics, data-analysis, normalization | 1,698,134,680 |
se_77403175 | stackoverflow | DATA_SCIENCE | Quantify confidence on a difference between two groups | Quantify confidence on a difference between two groups
I am looking to quantify certainty/confidence on a difference between two groups (see toy dataset):
# Create dataframe
df<-data.frame(
Age=c(40,40,40,40,41,41,41,41),
Strength=c(50,49,46,46,40,39,39,37)
)
# Summarise
mean40<-mean(subset(df,Age==40)$S... | https://stackoverflow.com/questions/77403175/quantify-confidence-on-a-difference-between-two-groups | r, statistics, difference, confidence-interval, standard-error | 1,698,846,988 |
se_77391974 | stackoverflow | DATA_SCIENCE | Approximating pi with the Monte Carlo method gives suprisingly accurate results | Approximating pi with the Monte Carlo method gives suprisingly accurate results
I am trying to apply the Monte Carlo method to obtain an approximate value of π but I am a little surprised by the results I obtained because it seemed to me that with 539,354 points drawn, I was supposed to get an approximate value of π t... | https://stackoverflow.com/questions/77391974/approximating-pi-with-the-monte-carlo-method-gives-suprisingly-accurate-results | python, statistics, pi | 1,698,701,693 |
se_8816729 | stackoverflow | DATA_SCIENCE | Javascript equivalent for Inverse normal function ? eg Excel's NORMSINV() or NORMINV()? | Javascript equivalent for Inverse normal function ? eg Excel's NORMSINV() or NORMINV()?
I'm trying to convert something from my excel spreadsheets into Javascript and came along the NORMSINV() macro in my spreadsheets.
The NormSInv() is nicely documented at http://office.microsoft.com/en-us/excel-help/normsinv-H... | https://stackoverflow.com/questions/8816729/javascript-equivalent-for-inverse-normal-function-eg-excels-normsinv-or-nor | javascript, math, statistics, normal-distribution | 1,326,273,255 |
se_77390458 | stackoverflow | DATA_SCIENCE | How do I plot percentile graph with interval data | How do I plot percentile graph with interval data
How do I plot percentile graph with interval data?
See the code below to calculate percentiles of data based on specific intervals.
idx = pd.IntervalIndex.from_breaks([39.9, 42.9,45.9,48.9,51.9,54.9,57.9])
df = pd.DataFrame({"Bin": idx, "Frequency": [2,2,5,5,12,3]})
n ... | https://stackoverflow.com/questions/77390458/how-do-i-plot-percentile-graph-with-interval-data | python, pandas, statistics | 1,698,684,210 |
se_77384505 | stackoverflow | DATA_SCIENCE | How do I calculate the standard deviation of interval (binned) data in pandas? | How do I calculate the standard deviation of interval (binned) data in pandas?
How would I calculate the standard deviation of the interval frequency data below using pandas?
idx = pd.IntervalIndex.from_breaks([105, 110, 115, 120, 125, 130, 135])
df = pd.DataFrame({"Bin": idx, "Frequency": [2,5,6,8,8,1]})
df
Addition... | https://stackoverflow.com/questions/77384505/how-do-i-calculate-the-standard-deviation-of-interval-binned-data-in-pandas | python, pandas, statistics | 1,698,601,696 |
se_34893615 | stackoverflow | DATA_SCIENCE | Scaling the fitted PDF of a log-normal distribution to the histogram | Scaling the fitted PDF of a log-normal distribution to the histogram
I have a log-normal distributed set a samples and want to perform a fit to it. Then I want to plot both the histogram of the samples and the fitted PDF into one plot, and I'd like to use the original scaling for the histogram.
My question: How to d... | https://stackoverflow.com/questions/34893615/scaling-the-fitted-pdf-of-a-log-normal-distribution-to-the-histogram | python, matplotlib, scipy, statistics, probability-distribution | 1,453,273,784 |
se_35001607 | stackoverflow | DATA_SCIENCE | Scaling and fitting to a log-normal distribution using a logarithmic axis | Scaling and fitting to a log-normal distribution using a logarithmic axis
I have a log-normal distributed set of samples. I can visualize the samples using a histrogram with either linear or logarithmic x-axis. I can perform a fit to the histogram to get the PDF and then scale it to the histrogram in the plot with the... | https://stackoverflow.com/questions/35001607/scaling-and-fitting-to-a-log-normal-distribution-using-a-logarithmic-axis | python, matplotlib, scipy, statistics | 1,453,753,220 |
se_77286159 | stackoverflow | DATA_SCIENCE | Difference between using lists of arrays and individual arrays in scipy.stats.mannwhitneyu | Difference between using lists of arrays and individual arrays in scipy.stats.mannwhitneyu
I have been tinkering with the scipy.stats.mannwhitneyu function but I am afraid I don't quite understand what inputs should be used. I tried reading the documentation on the scipy site (https://docs.scipy.org/doc/scipy/referenc... | https://stackoverflow.com/questions/77286159/difference-between-using-lists-of-arrays-and-individual-arrays-in-scipy-stats-ma | python, statistics | 1,697,185,179 |
se_77375870 | stackoverflow | DATA_SCIENCE | Owen's T function in Excel | Owen's T function in Excel
For context, I was trying to find a way to set the skewness of a distribution, leading me to the skew normal distribution which uses Owen's T in its cumulative distribution function. After searching up for a bit, my understanding was that Excel does not provide it.
While I did realize a... | https://stackoverflow.com/questions/77375870/owens-t-function-in-excel | excel, statistics | 1,698,425,610 |
se_76011060 | stackoverflow | DATA_SCIENCE | Error when fitting a bivariate latent change score model using r package lcsm | Error when fitting a bivariate latent change score model using r package lcsm
I am trying to fit a bivariate latent change score model for two time points using the lcsm package but am running into an error.
When I try to extract fit statistics, I get the following error:
Error: No glance method for objects of class c... | https://stackoverflow.com/questions/76011060/error-when-fitting-a-bivariate-latent-change-score-model-using-r-package-lcsm | r, statistics | 1,681,437,715 |
se_77374193 | stackoverflow | DATA_SCIENCE | How do I add a column to a df that was created with pd.cut | How do I add a column to a df that was created with pd.cut
How do I add a column to a df that was created with pd.cut?
s = pd.Series(np.arange(10))
df = pd.cut(s, [-5, 0, 5, 10] )
df["Frequency"] = pd.Series(np.arange(10))
df
The output is attached however I would want C to be added to the existing df to the right a... | https://stackoverflow.com/questions/77374193/how-do-i-add-a-column-to-a-df-that-was-created-with-pd-cut | python, pandas, statistics | 1,698,410,082 |
se_77373314 | stackoverflow | DATA_SCIENCE | Generating all possible combinations of filling a fixed vector with 2 values in Julia | Generating all possible combinations of filling a fixed vector with 2 values in Julia
I am wanting to generate an iteratable that can calculate all possible ways to fill a vector with binary values. It would be preferred to be iterable as I then require to apply selection criteria before storing the vector inside a ma... | https://stackoverflow.com/questions/77373314/generating-all-possible-combinations-of-filling-a-fixed-vector-with-2-values-in | vector, statistics, julia, combinations | 1,698,401,509 |
se_77372537 | stackoverflow | DATA_SCIENCE | How do I load predefined bins with quantities into pandas | How do I load predefined bins with quantities into pandas
I am working through a stats textbook, some of the questions have pre-calculated bins with frequencies. I have been using pd.cut when I have the underlying data but here it is not the case. For example
Bin
Frequency
105-109
2
110-114
5
115-119
6
1... | https://stackoverflow.com/questions/77372537/how-do-i-load-predefined-bins-with-quantities-into-pandas | python, pandas, numpy, statistics | 1,698,394,736 |
se_10988082 | stackoverflow | DATA_SCIENCE | Multivariate polynomial regression with numpy | Multivariate polynomial regression with numpy
I have many samples (y_i, (a_i, b_i, c_i)) where y is presumed to vary as a polynomial in a,b,c up to a certain degree. For example for a given set of data and degree 2 I might produce the model
y = a^2 + 2ab - 3cb + c^2 +.5ac
This can be done using least squares and i... | https://stackoverflow.com/questions/10988082/multivariate-polynomial-regression-with-numpy | python, numpy, statistics, regression | 1,339,451,736 |
se_27928275 | stackoverflow | DATA_SCIENCE | Find p-value (significance) in scikit-learn LinearRegression | Find p-value (significance) in scikit-learn LinearRegression
How can I find the p-value (significance) of each coefficient?
lm = sklearn.linear_model.LinearRegression()
lm.fit(x,y) | https://stackoverflow.com/questions/27928275/find-p-value-significance-in-scikit-learn-linearregression | python, scikit-learn, statistics, regression, hypothesis-test | 1,421,171,173 |
se_77354732 | stackoverflow | DATA_SCIENCE | How to create a leaps.AIC plotting in R | How to create a leaps.AIC plotting in R
I have this CSV file, and I want to complete this prompt:
https://drive.google.com/file/d/1_iF17DuxXDW3Ev87LRmeydFILX6EYMIE/view?usp=sharing
Use the command ‘leaps’ in the R package “leaps” to choose a good subset of the 16 predictors to include in a linear model with “salary” a... | https://stackoverflow.com/questions/77354732/how-to-create-a-leaps-aic-plotting-in-r | r, statistics | 1,698,173,885 |
se_77343847 | stackoverflow | DATA_SCIENCE | Problem with simulation study by mixed model | Problem with simulation study by mixed model
I'm trying to run a simulation study using a linear mixed model. As an example and in order to present the same error that I have been facing, I am posting here the structure of my model using Orthodont data as an example. My model is defined as follows:
library(lme4)
head(... | https://stackoverflow.com/questions/77343847/problem-with-simulation-study-by-mixed-model | r, statistics, simulation, lme4, mixed-models | 1,698,051,123 |
se_77347355 | stackoverflow | DATA_SCIENCE | Trying to gain intuition for curve-fitting function in scipy | Trying to gain intuition for curve-fitting function in scipy
I'd like to gain some intuition behind the scipy function scipy.optimize.curve_fit(). Below, I've written a simple version trying to minimise the sum of least squares function(the weights are all 1), with the model being sin(omega*t). I employ the Newton-Rap... | https://stackoverflow.com/questions/77347355/trying-to-gain-intuition-for-curve-fitting-function-in-scipy | python, math, statistics, statsmodels, numerical-methods | 1,698,083,801 |
se_77342487 | stackoverflow | DATA_SCIENCE | How to delete values in Axis x of plots using R | How to delete values in Axis x of plots using R
I have a simple dataframe like this
data_umur = data.frame(
kategori_umur = c("18-23", "23-28", "28-33", "33-38","38-43", "43-48", "48-53"),
frekuensi = c(257,73,103,15,36,14,2),
mid_kelompok_umur = c(20.5, 25.5, 30.5, 35.5, 40.5, 45.5, 50.5),
c_i = c(0, 1,2,3,4,5,6)
)
... | https://stackoverflow.com/questions/77342487/how-to-delete-values-in-axis-x-of-plots-using-r | r, plot, statistics, polygon | 1,698,031,473 |
se_77337041 | stackoverflow | DATA_SCIENCE | Statistics in python: MFB and MFE | Statistics in python: MFB and MFE
I have been requested in work to compute MFB and MFE. In the attached image the formulas are cited, and below is the code I used.
MFB=(2*np.nansum((MODEL-MEAS)))/(N*np.nansum(np.absolute(MODEL+MEAS)))
MFE=(2*np.nansum(np.absolute(MODEL-MEAS)))/(N*np.nansum(np.absolute(MODEL+MEAS)))
W... | https://stackoverflow.com/questions/77337041/statistics-in-python-mfb-and-mfe | python, statistics | 1,697,908,526 |
se_74951890 | stackoverflow | DATA_SCIENCE | What is "delta" in R function power.t.test() and how i can get it? | What is "delta" in R function power.t.test() and how i can get it?
I need to get the minimum amount of data in each group needed for some power and significance levels. I have two samples(quantitative,continuous) of different sizes.
I find function power.t.test() in R, but i don't understand what is "delta" ... | https://stackoverflow.com/questions/74951890/what-is-delta-in-r-function-power-t-test-and-how-i-can-get-it | r, statistics | 1,672,321,430 |
se_74675438 | stackoverflow | DATA_SCIENCE | Computing KL-divergence over 2 estimated gaussian KDEs | Computing KL-divergence over 2 estimated gaussian KDEs
I have two datasets with the same features and would like to estimate the "distance of distributions" between the two datasets. I had the idea to estimate a gaussian KDE in each of the datasets and computing the KL-divergence between the estimated KDEs. However, I... | https://stackoverflow.com/questions/74675438/computing-kl-divergence-over-2-estimated-gaussian-kdes | python, machine-learning, scikit-learn, statistics | 1,670,155,787 |
se_77332622 | stackoverflow | DATA_SCIENCE | How can I transform the standard deviation after transforming (x, y) points? | How can I transform the standard deviation after transforming (x, y) points?
I am plotting a set of (x, y) points. The blue bars are my error bars. I'm scaling my (x, y) points to be (x, y^2). I'm squaring my error bars by squaring them too. However, they seem tiny after squaring them.
My y values before squaring are ... | https://stackoverflow.com/questions/77332622/how-can-i-transform-the-standard-deviation-after-transforming-x-y-points | python, statistics | 1,697,821,010 |
se_77276887 | stackoverflow | DATA_SCIENCE | Total explained variance based on three dependent correlation coefficients | Total explained variance based on three dependent correlation coefficients
Is there any way to compute the total explained variance of a variable x explained by two dependent variables y and z when only the three correlation coefficients are known?
Let's say the following correlations are available (but not the raw da... | https://stackoverflow.com/questions/77276887/total-explained-variance-based-on-three-dependent-correlation-coefficients | statistics, dependencies, correlation | 1,697,067,044 |
se_61756387 | stackoverflow | DATA_SCIENCE | McNemar exact test | McNemar exact test
I have the following data:
> Performance = as.table(rbind(c(794,150),c(86,570))
> Performance
A B
A 794 150
B 86 570
I perform an Exact McNemar test in R, obtaining the following result:
> library(exact2x2)
> mcnemar.exact(Performance)
Exact McNemar test (with central confidence interva... | https://stackoverflow.com/questions/61756387/mcnemar-exact-test | r, statistics, contingency, statistical-test | 1,589,299,519 |
se_77324145 | stackoverflow | DATA_SCIENCE | why confidence interval of 100 does not cover full data? | why confidence interval of 100 does not cover full data?
I have this dataframe df1 with the following .head()
month temp
date
2023-01-01 01:00:00 1 11.0
2023-01-01 02:00:00 1 11.0
2023-01-01 03:00:00 1 10.0
2023-01-01 04:00:00 1 10.0
2023-01-01 ... | https://stackoverflow.com/questions/77324145/why-confidence-interval-of-100-does-not-cover-full-data | python, statistics, seaborn | 1,697,721,525 |
se_77314319 | stackoverflow | DATA_SCIENCE | Am I interpreting my data incorrectly or have I done the test analysis wrong? | Am I interpreting my data incorrectly or have I done the test analysis wrong?
I'm having an issue with interpreting my results and I don't know if I have done the test analysis correctly.
To me is seem like the test analysis data doesn't match up to verify the results of my graph.
For example I have done a correlation... | https://stackoverflow.com/questions/77314319/am-i-interpreting-my-data-incorrectly-or-have-i-done-the-test-analysis-wrong | r, statistics, correlation, scatter-plot | 1,697,614,662 |
se_77313280 | stackoverflow | DATA_SCIENCE | How do I find the parameters for a best-fit-model of a sine-function? | How do I find the parameters for a best-fit-model of a sine-function?
My professor is asking me to use fitModel and coef to find the best model for a data set. I'm trying to find the correct A, P, h and v value and then plot the line-of-best-fit over my conjectured model.
This is the code that I am trying:
plotPoints(... | https://stackoverflow.com/questions/77313280/how-do-i-find-the-parameters-for-a-best-fit-model-of-a-sine-function | r, statistics | 1,697,598,703 |
se_77220287 | stackoverflow | DATA_SCIENCE | Truncated Maximum Likelihood estimator | Truncated Maximum Likelihood estimator
I am trying to estimate the parameters of Truncated New Generalized Poisson Lindly distribution.
Here in this distribution, we use two parameters which are alpha1, beta1, When I run Optimum function then I should get the values of estimators alpha1, beta1.
I get those values in R... | https://stackoverflow.com/questions/77220287/truncated-maximum-likelihood-estimator | r, statistics, poisson, mle, probability-distribution | 1,696,316,942 |
se_77309891 | stackoverflow | DATA_SCIENCE | LinAlgError("Singular matrix") with statsmodels logistic regression | LinAlgError("Singular matrix") with statsmodels logistic regression
I'm looking for associations between each predictor in a set of predictors x and each dependent variable in a set of outcomes y corrected for a set of covariates using univariate logistic regression models with statsmodels in Python (N=153).... | https://stackoverflow.com/questions/77309891/linalgerrorsingular-matrix-with-statsmodels-logistic-regression | python, matrix, statistics, logistic-regression, statsmodels | 1,697,552,811 |
se_77290657 | stackoverflow | DATA_SCIENCE | algorithm to generate numbers which have a given average product based on distance | algorithm to generate numbers which have a given average product based on distance
I am trying to come up with an algorithm which generates numbers that have a given average product based on their distance. For example, say there were 4 points on the x-axis, x1 x2 x3 and x4. Each point has a position and a value. x1's... | https://stackoverflow.com/questions/77290657/algorithm-to-generate-numbers-which-have-a-given-average-product-based-on-distan | algorithm, math, statistics, mathematical-optimization | 1,697,231,403 |
se_25695986 | stackoverflow | DATA_SCIENCE | Why is pandas.Series.std() different from numpy.std()? | Why is pandas.Series.std() different from numpy.std()?
This is what I am trying to explain:
>>> a = pd.Series([7, 20, 22, 22])
>>> a.std()
7.2284161474004804
>>> np.std(a)
6.2599920127744575
I have data about many different restaurants. For simplicity I have extracted just one restaurant with four items:
>>> df
... | https://stackoverflow.com/questions/25695986/why-is-pandas-series-std-different-from-numpy-std | python, pandas, numpy, statistics | 1,409,967,086 |
se_77291120 | stackoverflow | DATA_SCIENCE | Graph embedding to split merged nodes | Graph embedding to split merged nodes
I really need help from the graph/network experts.
Suppose I have a graph, there is one adjacency matrix, which is 2n*2n, nodes number is 2n. I also have another adjacency matrix, which is n*n matrix. Statistically, the second adjacency matrix is generated from 2n*2n matrix by row... | https://stackoverflow.com/questions/77291120/graph-embedding-to-split-merged-nodes | deep-learning, 3d, statistics, conv-neural-network, embedding | 1,697,240,541 |
se_77300996 | stackoverflow | DATA_SCIENCE | Find parameters with maximum likelihood method from histograms | Find parameters with maximum likelihood method from histograms
For a problem I am asked to generate two random exponential distributions with different lambda's, mix them up, and then extract two lambdas with the method of moments. In the second part of the problem I am asked to find the two lambda's from the mixed da... | https://stackoverflow.com/questions/77300996/find-parameters-with-maximum-likelihood-method-from-histograms | python, statistics, scipy-optimize, log-likelihood | 1,697,450,182 |
se_76237342 | stackoverflow | DATA_SCIENCE | How to compare the two variances in R using the F-test (given sample sizes and variances) | How to compare the two variances in R using the F-test (given sample sizes and variances)
I am trying to run an F-test to compare the following samples.
Group 1 sample variance: 4.1
Group 1 sample size: 32
Group 2 sample variance: 3.7
Group 2 sample size: 37
Tail: Right
Alpha level: 0.05
I know that the correct output... | https://stackoverflow.com/questions/76237342/how-to-compare-the-two-variances-in-r-using-the-f-test-given-sample-sizes-and-v | r, statistics | 1,683,901,910 |
se_77301399 | stackoverflow | DATA_SCIENCE | Having trouble running one-way ANOVAs in R on different categories | Having trouble running one-way ANOVAs in R on different categories
I have a dataset where I want to see if there is a significant difference in growth between different oyster treatments using an ANOVA test. I apologize if my stats knowledge is rusty and my data is not formatted correctly, but my dataset is in long f... | https://stackoverflow.com/questions/77301399/having-trouble-running-one-way-anovas-in-r-on-different-categories | r, statistics, lapply, anova | 1,697,453,954 |
se_77295546 | stackoverflow | DATA_SCIENCE | SAS CODE to order variables Means from highest to lowest mean | SAS CODE to order variables Means from highest to lowest mean
I can't do the SAS code to order a set of variables means from highest to lowest.
I already got the means of each variables, but I can't get SAS to order the variables from highest to lowest mean.
I already tried:
proc means data=stats std mean;
var x1 x... | https://stackoverflow.com/questions/77295546/sas-code-to-order-variables-means-from-highest-to-lowest-mean | statistics, sas, linear-regression, sas-macro, mlogit | 1,697,351,881 |
se_10231206 | stackoverflow | DATA_SCIENCE | Can scipy.stats identify and mask obvious outliers? | Can scipy.stats identify and mask obvious outliers?
With scipy.stats.linregress I am performing a simple linear regression on some sets of highly correlated x,y experimental data, and initially visually inspecting each x,y scatter plot for outliers. More generally (i.e. programmatically) is there a way to identify and... | https://stackoverflow.com/questions/10231206/can-scipy-stats-identify-and-mask-obvious-outliers | python, statistics, scipy, linear-regression | 1,334,848,477 |
se_77291176 | stackoverflow | DATA_SCIENCE | Python - Best Way to Get Mode With Scipy And Have Clean Code | Python - Best Way to Get Mode With Scipy And Have Clean Code
import statistics
import scipy
# I would like to do this with scipy.
print(statistics.mode([1, 2, 3]))
# returns 1, I would like 'no mode'
print([statistics.mode([1, 1, 2, 3, 3]))
# returns 1, I would like [1, 3]
I am looking for the best solution to this... | https://stackoverflow.com/questions/77291176/python-best-way-to-get-mode-with-scipy-and-have-clean-code | python, python-3.x, scipy, statistics | 1,697,242,131 |
se_58339083 | stackoverflow | DATA_SCIENCE | How to sample from a log-probability distribution? | How to sample from a log-probability distribution?
I have some code that uses log-probability. When I want to draw a sample from the probability distribution, I use
import numpy as np
probs = np.exp(logprobs)
probs /= probs.sum()
sample = np.random.choice(X, p=probs, size=1)[0]
But there is some overhead here in t... | https://stackoverflow.com/questions/58339083/how-to-sample-from-a-log-probability-distribution | python, numpy, statistics, probability, sampling | 1,570,788,902 |
se_77290576 | stackoverflow | DATA_SCIENCE | How to fit "Random Intercept-Fixed Slope" in ggplot2? | How to fit "Random Intercept-Fixed Slope" in ggplot2?
I have the following data:
# Create an empty data frame to store the simulated data
data <- data.frame(
Lot = rep(1:num_lots, each = 9),
Time = rep(3 * 0:8, times = num_lots),
Purity = numeric(num_lots * 9)
)
# Simulate purity data for each lot and... | https://stackoverflow.com/questions/77290576/how-to-fit-random-intercept-fixed-slope-in-ggplot2 | r, ggplot2, statistics, mixed-models | 1,697,230,142 |
se_77290870 | stackoverflow | DATA_SCIENCE | Analysis for many Categorical and one Continuous trait | Analysis for many Categorical and one Continuous trait
My dataset contains multiple nominal non-binary variables (i.e- beak shape type, general eye position) which are represented/coded as numbers. For instance, for 'beak shape type' there are 4 options, 1-4, each representing a different shape. These variables are no... | https://stackoverflow.com/questions/77290870/analysis-for-many-categorical-and-one-continuous-trait | statistics, relationship, bioinformatics, correlation, anova | 1,697,234,673 |
se_77286120 | stackoverflow | DATA_SCIENCE | Statistically compare curves with python | Statistically compare curves with python
I am coming from the biomedical research field.
An experiment of mine could generate curves like in the image attached (the image attached are randomly generated example data).
I want to statistically say, that the blue curve is significantly behaving different compared to the ... | https://stackoverflow.com/questions/77286120/statistically-compare-curves-with-python | python, statistics, curve-fitting, curve | 1,697,184,776 |
se_77269251 | stackoverflow | DATA_SCIENCE | How can one determine the period of a single element of a dataset? | How can one determine the period of a single element of a dataset?
I have dummy data and actual data that I suspect modulates over 24 hours
The dummy data is in this Desmos Graph.
I want to find the period of the periodic component of the data that's input. There are other components that are constants, falls, and noi... | https://stackoverflow.com/questions/77269251/how-can-one-determine-the-period-of-a-single-element-of-a-dataset | python, scipy, statistics, time-series, periodicity | 1,696,976,220 |
se_77269694 | stackoverflow | DATA_SCIENCE | Best way to calculate mean from database with too many outliers (0s) in price variable | Best way to calculate mean from database with too many outliers (0s) in price variable
At my job, I was asked to calculate the mean for prices in specific articles from the company's database. Issue is that many values in database are 0, so simply calculating the mean may pull the results down because of the 0s. My qu... | https://stackoverflow.com/questions/77269694/best-way-to-calculate-mean-from-database-with-too-many-outliers-0s-in-price-va | sql, r, statistics, dbplyr | 1,696,986,297 |
se_77278201 | stackoverflow | DATA_SCIENCE | Using Python to count the number of lines in a CSV file where multiple titles contain information at the same time | Using Python to count the number of lines in a CSV file where multiple titles contain information at the same time
I need to count the number of lines in a CSV file where multiple titles contain information at the same time,
For example, this is my CSV file:
id,gender,name,age
1,M,Kerry Manders,
2,F,Cain Coulton,29
3... | https://stackoverflow.com/questions/77278201/using-python-to-count-the-number-of-lines-in-a-csv-file-where-multiple-titles-co | python, csv, statistics | 1,697,092,474 |
se_77277542 | stackoverflow | DATA_SCIENCE | Case_when function in saving new variable in column to existing df | Case_when function in saving new variable in column to existing df
I am using case_when function to recategorize an existing variable that allowed for up to 6 race selections. Based on a determined logic I am reclassifying those races in a new variable (new_racecat) that only displays one race selection. I have pasted... | https://stackoverflow.com/questions/77277542/case-when-function-in-saving-new-variable-in-column-to-existing-df | r, statistics, case | 1,697,081,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.