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_77796904
stackoverflow
DATA_SCIENCE
How to fit a constant using chi squared with errors
How to fit a constant using chi squared with errors I am trying to fit a constant using using Chi squared as the fitting statistic. The constant I am trying to fit is not a simple scaling constant but feeds into an equation which output values. const -> fn -> values and errors There are tonnes of posts on here about C...
https://stackoverflow.com/questions/77796904/how-to-fit-a-constant-using-chi-squared-with-errors
statistics, curve-fitting
1,704,929,139
se_77793957
stackoverflow
DATA_SCIENCE
Getting error while running flexsurvreg function
Getting error while running flexsurvreg function Can anyone help me how to to define the below given custom distribution in flexsurvreg function. custom_pdf=function(y,b0,b1,b2,b3,sigma,alpha){#pdf of proposed model z=(y-b0-b1*t2-b2*t3-b3*t4)/sigma ft=exp(z) num=alpha*ft*((exp(-ft))^alpha)*((1-exp(-ft))^(alpha-1...
https://stackoverflow.com/questions/77793957/getting-error-while-running-flexsurvreg-function
r, statistics, regression, distribution, mle
1,704,895,505
se_77783632
stackoverflow
DATA_SCIENCE
How to combine multiple probability distributions created through convolution - aligning x-axis
How to combine multiple probability distributions created through convolution - aligning x-axis I'm simulating event losses with Monte Carlo simulation but I'm having trouble aggregating multiple event losses, specifically with aligning losses to add probabilities. I'm using Monte Carlo to estimate the probability dis...
https://stackoverflow.com/questions/77783632/how-to-combine-multiple-probability-distributions-created-through-convolution
statistics, probability, convolution, montecarlo
1,704,756,161
se_77802393
stackoverflow
DATA_SCIENCE
Errorbars with factors in R
Errorbars with factors in R I have a graph with barplots and want to add errorbars, but really struggle with it. sd_int <-R %>% group_by(PSm, Day) %>% summarise(sd = sd(int)) mean_int <-R %>% group_by(PSm, Day) %>% summarise(mean = mean(int)) print(sd_int) print(mean_int) combined_data <- merge(mean_int, sd_in...
https://stackoverflow.com/questions/77802393/errorbars-with-factors-in-r
r, statistics
1,704,998,988
se_77800291
stackoverflow
DATA_SCIENCE
How can I get sequences of actions from a Pandas dataframe
How can I get sequences of actions from a Pandas dataframe I have a Pandas dataframe in Python in which is registered when Ramirez enters and leaves a building. I also have a list in which all events in the building are registrered, from turning on the lights to flushing a toilet or calling an elevator. I have ordered...
https://stackoverflow.com/questions/77800291/how-can-i-get-sequences-of-actions-from-a-pandas-dataframe
python, pandas, statistics, pattern-matching, combinations
1,704,978,344
se_77786552
stackoverflow
DATA_SCIENCE
Collision rate of `rand64()` function in Clickhouse
Collision rate of `rand64()` function in Clickhouse I'm planning to use Int64() for primary key and rand64() for it's generation. I need uniqueness (no collisions) and I'm planning to have billions of rows. I cannot use UUID for other reasons. What is the probability of it to generate collision? I know that UUID is pr...
https://stackoverflow.com/questions/77786552/collision-rate-of-rand64-function-in-clickhouse
statistics, clickhouse
1,704,800,966
se_77786816
stackoverflow
DATA_SCIENCE
Radar Vegation Index scaling issues [0, 1] for Sentinel-1 data
Radar Vegation Index scaling issues [0, 1] for Sentinel-1 data I am trying to understand some data issues I am having with using Sentinel-1 VV and VH data to create RVI statistics. I am familiar with the fact that you need true quad polarisation to calculate the RVI. The best approximate RVI equation for S1 has been d...
https://stackoverflow.com/questions/77786816/radar-vegation-index-scaling-issues-0-1-for-sentinel-1-data
python, image-processing, statistics, sentinel1
1,704,803,811
se_26739745
stackoverflow
DATA_SCIENCE
Multiple boxplots in SAS
Multiple boxplots in SAS I have this data set and I would like to make all boxplots of the 9 input variables to appear on the same plot, despite that they are in different scales. Could you please tell me if there is an easy way to accomplish this? I am a novice SAS user so I would appreciate some advice. Thank you....
https://stackoverflow.com/questions/26739745/multiple-boxplots-in-sas
statistics, sas
1,415,117,308
se_77783243
stackoverflow
DATA_SCIENCE
Intra class correlation coefficient equals 1 for both random effects
Intra class correlation coefficient equals 1 for both random effects I am evaluating for clustering of two grouping variables that I may include as random effects in a glmm with other predictors. Both grouping variables are nested elements of the study design. The first is "Sample" (for context, each microbiological f...
https://stackoverflow.com/questions/77783243/intra-class-correlation-coefficient-equals-1-for-both-random-effects
statistics, lme4
1,704,749,310
se_77773742
stackoverflow
DATA_SCIENCE
Statistical difference between two matrices
Statistical difference between two matrices I have two matrices, for example; x1 = [1,2,3]; y1 = [4,5,6]; m1 = [x1,y1]; x2 = [4,5,6]; y2 = [7,8,9]; m2 = [x2,y2]; How do I test if m1 and m2 are significantly different from one another?
https://stackoverflow.com/questions/77773742/statistical-difference-between-two-matrices
matlab, statistics
1,704,642,412
se_77767517
stackoverflow
DATA_SCIENCE
Combine rows and columns to create a 2x2 table for Fisher&#39;s exact test
Combine rows and columns to create a 2x2 table for Fisher&#39;s exact test I need to perform a test of independence on the following crosstab ct using python: Since there are some values less than 5, I cannot perform the chi-square test of independence. Instead, I need to perform Fisher's exact test. Since Fisher's e...
https://stackoverflow.com/questions/77767517/combine-rows-and-columns-to-create-a-2x2-table-for-fishers-exact-test
python, scipy, statistics, data-analysis
1,704,494,187
se_77762139
stackoverflow
DATA_SCIENCE
How do I simulate Bayes theorem in R to get a sense of uncertainty?
How do I simulate Bayes theorem in R to get a sense of uncertainty? Okay, so Bayes theorem is p(A|B) = p(A) * P(B|A) * 1/p(B). I want to simulate p(A|B) using all the uncertainty surrounding p(A), p(B|A) and p(B). rbeta seems like a good choice. data: imagine I just spent 20 days in a new location and have a sense of ...
https://stackoverflow.com/questions/77762139/how-do-i-simulate-bayes-theorem-in-r-to-get-a-sense-of-uncertainty
r, statistics, simulation, bayesian, sampling
1,704,420,351
se_77766687
stackoverflow
DATA_SCIENCE
Linear regression for Physical problem predicting complex number (absolute and phase)
Linear regression for Physical problem predicting complex number (absolute and phase) I am trying to do a linear regression which takes some physical measurements and then predicts various Physical values. One of these Physical values is a complex number, so I am trying to split it into two and predict the magnitude a...
https://stackoverflow.com/questions/77766687/linear-regression-for-physical-problem-predicting-complex-number-absolute-and-p
machine-learning, statistics, artificial-intelligence, non-linear-regression
1,704,481,394
se_77763912
stackoverflow
DATA_SCIENCE
Use VPA to evaluate tiny probabilities
Use VPA to evaluate tiny probabilities For a statistics application, I need to evaluate tiny chi-square probabilities. But when this becomes smaller than matlab's double-precision limit realmin (around 1e-308), it returns 0. x=50; p=chi2cdf(x^2,4,'upper') >> 0 All I need is to store the order of magnitude of the numb...
https://stackoverflow.com/questions/77763912/use-vpa-to-evaluate-tiny-probabilities
matlab, statistics, precision, probability, arbitrary-precision
1,704,450,286
se_77757158
stackoverflow
DATA_SCIENCE
Excel, how to have grouped TRIMMEAN
Excel, how to have grouped TRIMMEAN Hi i have dynamic data updated from remote every day of that type state city id number s1 c1 i1 45 s1 c1 i2 2 s1 c2 i3 12 s2 c1 i4 23 s2 c4 i5 45 i need a result set with this structure state city avg i try with pivot but TRIMMEAN() is not available as gr...
https://stackoverflow.com/questions/77757158/excel-how-to-have-grouped-trimmean
excel, excel-formula, statistics, mean
1,704,360,824
se_39434402
stackoverflow
DATA_SCIENCE
How to get confidence intervals from curve_fit
How to get confidence intervals from curve_fit My question involves statistics and python and I am a beginner in both. I am running a simulation, and for each value for the independent variable (X) I produce 1000 values for the dependent variable (Y). What I have done is that I calculated the average of Y for each val...
https://stackoverflow.com/questions/39434402/how-to-get-confidence-intervals-from-curve-fit
python, python-3.x, scipy, statistics, curve-fitting
1,473,583,931
se_65132970
stackoverflow
DATA_SCIENCE
Statistical annotations in plotly bar graph
Statistical annotations in plotly bar graph What is a good way to create statistical annotations in plotly bar graphs? And how can I move the p-value in the figure below to the middle, i.e. between the two bar charts? Image of plotly graph with p-values import plotly.graph_objects as go import pandas as pd df = pd.re...
https://stackoverflow.com/questions/65132970/statistical-annotations-in-plotly-bar-graph
python, pandas, statistics, plotly, p-value
1,607,024,408
se_77695253
stackoverflow
DATA_SCIENCE
Sampling two correlated random variables using the gamma distribution
Sampling two correlated random variables using the gamma distribution I have two random variables that are distributed by the gamma distribution. These random variables are negatively correlated by a coefficient of -.1. I'm not sure how to incorporate the correlation correctly. By looking at many different examples, I...
https://stackoverflow.com/questions/77695253/sampling-two-correlated-random-variables-using-the-gamma-distribution
r, statistics, gamma-distribution
1,703,120,860
se_4780826
stackoverflow
DATA_SCIENCE
Mobile apps statistics API
Mobile apps statistics API I need to collect stats for my mobile apps. I like flurry.com but I want to use my server and generate custom reports for my users. Do you know if exists opensource API like flurry library?
https://stackoverflow.com/questions/4780826/mobile-apps-statistics-api
android, ios, mobile, statistics
1,295,864,098
se_66573076
stackoverflow
DATA_SCIENCE
Three-Way Anova in R
Three-Way Anova in R I am trying to do a three-way ANOVA in R Studio (the latest version) and I can't seem to figure out the code that will allow me to do this. I am trying to see if there is a significant difference between the three variables "Latitude May", "Latitude June", and "Latitude July". I have attached a sa...
https://stackoverflow.com/questions/66573076/three-way-anova-in-r
r, statistics, anova
1,615,411,443
se_77736807
stackoverflow
DATA_SCIENCE
Produced invalid scale when simulated Generalized Pareto Distribution to find mse rmse and bias
Produced invalid scale when simulated Generalized Pareto Distribution to find mse rmse and bias I am working on Generalized Pareto Distribution in R and I want to calculate the bias, mse and rmse of the disitribtion. However when I'm using the mle function the following error occured. Error in dgpd(x = samples, scale ...
https://stackoverflow.com/questions/77736807/produced-invalid-scale-when-simulated-generalized-pareto-distribution-to-find-ms
r, optimization, statistics
1,703,956,951
se_44843134
stackoverflow
DATA_SCIENCE
partial correlation coefficient in pandas dataframe
partial correlation coefficient in pandas dataframe I have a data in pandas dataframe like: df = X1 X2 X3 Y 0 1 2 10 5.077 1 2 2 9 32.330 2 3 3 5 65.140 3 4 4 4 47.270 4 5 2 9 80.570 and I want to do multiple regression analysis. Here Y is dependent variables and x1, x2...
https://stackoverflow.com/questions/44843134/partial-correlation-coefficient-in-pandas-dataframe
pandas, statistics, correlation
1,498,814,957
se_77703069
stackoverflow
DATA_SCIENCE
Encountering an UseMethod(&quot;predict&quot;) error when trying to run &#39;predict; command in R
Encountering an UseMethod(&quot;predict&quot;) error when trying to run &#39;predict; command in R I am trying to run a SIS(Sure Independence screening)-SCAD model on a high-dimensional dataset. My goal is to measure a confusion matrix and then calculate these following metrics - accuracy, sensitivity, specificity and...
https://stackoverflow.com/questions/77703069/encountering-an-usemethodpredict-error-when-trying-to-run-predict-command
r, statistics
1,703,240,546
se_77711095
stackoverflow
DATA_SCIENCE
Different pattern and colors two-way ANOVA barplot
Different pattern and colors two-way ANOVA barplot I´m plotting two factors and two variables in the same graph. However, I want that the factor time not only appears each bar with a different color, but also with a different pattern (using ggpattern). Nonetheless, I only achieved adding the color. Here is the dataset...
https://stackoverflow.com/questions/77711095/different-pattern-and-colors-two-way-anova-barplot
r, ggplot2, statistics, anova, ggpattern
1,703,432,371
se_77691386
stackoverflow
DATA_SCIENCE
Calculation of the standard deviation using mean and the percentages
Calculation of the standard deviation using mean and the percentages I want to calculate the standard deviation using the mean and percentage. For example: I a class 20% students have less the 30 marks, 40% students got from 30 t0 60 marks and 40% are above 60 marks. The average score (mean) of the class is 66 marks. ...
https://stackoverflow.com/questions/77691386/calculation-of-the-standard-deviation-using-mean-and-the-percentages
statistics
1,703,073,435
se_77653188
stackoverflow
DATA_SCIENCE
Gabor Data Analysis: Chapter 1 Stuck in a Code: How to Set Directory
Gabor Data Analysis: Chapter 1 Stuck in a Code: How to Set Directory Dear Stackoverflow Community, I am trying to self-teach myself R and data analysis using the textbook "Békés, Gábor. Data Analysis for Business, Economics, and Policy" (https://gabors-data-analysis.com/) and I am stuck in the below code using Hotel V...
https://stackoverflow.com/questions/77653188/gabor-data-analysis-chapter-1-stuck-in-a-code-how-to-set-directory
r, statistics, data-analysis, summary
1,702,466,656
se_32329321
stackoverflow
DATA_SCIENCE
How do I get just the first quartile from a column
How do I get just the first quartile from a column I have a dataframes with a column called Means. I want to get just the first quartile from this column. I know I can use quartile (df) or summary (df) but this gives me all the quartiles. How do I get just the first?
https://stackoverflow.com/questions/32329321/how-do-i-get-just-the-first-quartile-from-a-column
r, statistics
1,441,103,404
se_77682524
stackoverflow
DATA_SCIENCE
Finding the Outlines of a Graph
Finding the Outlines of a Graph I'm trying to find the equations of the outlines of a graph in python with matplotlib.pyplot (in terms of μ and σ). I already, numpy and scipy outlined the graph, but I can't find a way of getting the equations of both of the lines in terms of the mean and standard deviation. import mat...
https://stackoverflow.com/questions/77682524/finding-the-outlines-of-a-graph
python, statistics
1,702,949,840
se_70002536
stackoverflow
DATA_SCIENCE
How to calculate group and outcome numbers using known values
How to calculate group and outcome numbers using known values When trying to perform a meta-analysis using the metabin library, I need the values below: event.e, n.e, event.c, and n.c However, I don't have these values, so was hoping to calculate them using known data: Odds Ratio + logOR, 95% CIs (Upper and Lower), ...
https://stackoverflow.com/questions/70002536/how-to-calculate-group-and-outcome-numbers-using-known-values
r, statistics, metafor
1,637,144,203
se_77668187
stackoverflow
DATA_SCIENCE
Adding pvalues in regression
Adding pvalues in regression results <- data.frame(prov = rownames(reg1$coefficients), b = reg1$coefficients, se = 0) results$se[!is.na(reg1$coefficients)] <- reg1$se results This shows the coefficients and the se... how can I make that this shows also the pvalues?? prov b se ln_Y...
https://stackoverflow.com/questions/77668187/adding-pvalues-in-regression
r, statistics
1,702,664,940
se_76320119
stackoverflow
DATA_SCIENCE
Is there a way to estimate multinomial proportions with confidence intervals using R survey package?
Is there a way to estimate multinomial proportions with confidence intervals using R survey package? I have a survey data, with categorical variables. I would like to compute the proportion for each responses in Q1, as well as generating the confidence interval or uncertainty around the estimate. Is that doable? The d...
https://stackoverflow.com/questions/76320119/is-there-a-way-to-estimate-multinomial-proportions-with-confidence-intervals-usi
r, statistics, multinomial, proportions
1,684,902,781
se_77639403
stackoverflow
DATA_SCIENCE
In Distributions.jl package for Julia, how to define MvNormal distributions with the Cholesky matrix?
In Distributions.jl package for Julia, how to define MvNormal distributions with the Cholesky matrix? I am writing some code that transforms multi-variate distributions by operating mostly on the cholesky factor of the covariance matrix. Suppose I have using Distributions g1 = MvNormal([1,2], [2 1; 1 2]) The naive wa...
https://stackoverflow.com/questions/77639403/in-distributions-jl-package-for-julia-how-to-define-mvnormal-distributions-with
statistics, julia, normal-distribution, matrix-factorization
1,702,295,879
se_25775468
stackoverflow
DATA_SCIENCE
How to calculate a Goodness of Fit using Math.net?
How to calculate a Goodness of Fit using Math.net? Say, I have a die that is 19 times as likely to produce a six as a one, because it has been tampered with. When I throw this die 60 times the expected versus observed frequencies of the six possible outcomes are: 1: 10, 1 2: 10, 10 3: 10, 10 4: 10, 10 5: 10, 10 6: 10...
https://stackoverflow.com/questions/25775468/how-to-calculate-a-goodness-of-fit-using-math-net
.net, statistics, chi-squared, math.net
1,410,384,905
se_77641462
stackoverflow
DATA_SCIENCE
How to Calculate a 2D Empirical CDF via histogram2d
How to Calculate a 2D Empirical CDF via histogram2d I am trying to obtain a matrix representation of an empirical 2 dimensional CDF given two data samples of the same size. I have two sorted data samples of the same size: sorted_sample1 and sorted_sample2 . I want a matrix which represents their 2 dimensional empirica...
https://stackoverflow.com/questions/77641462/how-to-calculate-a-2d-empirical-cdf-via-histogram2d
python, numpy, statistics, probability, sample
1,702,317,197
se_77653070
stackoverflow
DATA_SCIENCE
Calculating row-wise student&#39;s t test between selected variables in a dataframe - R
Calculating row-wise student&#39;s t test between selected variables in a dataframe - R I have a dataframe of individuals with different scores across different criteria, see example dataframe for 10 individuals each with 7 scores (A to G): set.seed(123) df <- data.frame( A = rnorm(10, mean = 0, sd = 1), B = rnorm...
https://stackoverflow.com/questions/77653070/calculating-row-wise-students-t-test-between-selected-variables-in-a-dataframe
r, dplyr, statistics, apply, purrr
1,702,465,600
se_77642813
stackoverflow
DATA_SCIENCE
Mahalanobis distance between two columns containing two variables
Mahalanobis distance between two columns containing two variables Good evening, I'd like to calculate the Mahalanobis distance between each observation of the two vectors (O_Temp, O_Salin) and (D_Temp, D_Salin) in the attached image. So, the aim is to calculate the Mahalanobis distance between the column vector (O_Tem...
https://stackoverflow.com/questions/77642813/mahalanobis-distance-between-two-columns-containing-two-variables
r, statistics, data-analysis
1,702,335,634
se_6814171
stackoverflow
DATA_SCIENCE
What is the mathematical way of calculating PERCENT_RANK() ,CUME_DIST() ,PERCENTILE_CONT() and PERCENTILE_DISC()
What is the mathematical way of calculating PERCENT_RANK() ,CUME_DIST() ,PERCENTILE_CONT() and PERCENTILE_DISC() I am trying to figure out how these newly introduced function in SQL Server Denali CTP 3 is working but didnot understood properly. There are ofcourse some articles on this but it has not been clearly men...
https://stackoverflow.com/questions/6814171/what-is-the-mathematical-way-of-calculating-percent-rank-cume-dist-percent
sql, sql-server, math, sql-server-2012, statistics
1,311,586,627
se_77647979
stackoverflow
DATA_SCIENCE
How can I generate a function to represent a collection of probabilities so that I can estimate between points
How can I generate a function to represent a collection of probabilities so that I can estimate between points My particular issue is that I am trying to find a better way to forecast for my business. I have a table of jobs and their likelihood. that looks like this: job % likely potential hours Job 1 .4 40 ...
https://stackoverflow.com/questions/77647979/how-can-i-generate-a-function-to-represent-a-collection-of-probabilities-so-that
python, statistics, probability
1,702,401,895
se_77645510
stackoverflow
DATA_SCIENCE
Simple seaborn distribution plot not working
Simple seaborn distribution plot not working I’m trying to plot the distribution of scores on reddit posts, but can’t figure it out. My data frame is something like that df = pd.DataFrame({"score": [12, 19, 25987, 887, 887, 1], "author": ["xxx", "x", "xxx", "xx", "xxxx", "x"]}) With a lot more data ...
https://stackoverflow.com/questions/77645510/simple-seaborn-distribution-plot-not-working
python, plot, statistics, seaborn, distribution
1,702,378,525
se_77642127
stackoverflow
DATA_SCIENCE
Generating dataframe with conditional random variables
Generating dataframe with conditional random variables I'm trying to create a dataframe with two variables. The first one is binary physical activity status (active/non-active), the second one is presence of cardiovascular disease (also binary variable - 1/0). The problem is that the presence of disease must occur wit...
https://stackoverflow.com/questions/77642127/generating-dataframe-with-conditional-random-variables
r, variables, random, statistics, simulation
1,702,324,888
se_77641558
stackoverflow
DATA_SCIENCE
FIxed effects with plm, problem with NaNs
FIxed effects with plm, problem with NaNs I am trying to run a time-fixed effects regression with plm using the wbstats library. I have attached an image of the dataset for reference. I am rather new to this. Model: AfricaTotal <- plm(IndustryGDP ~ CurrentImports + AgriProd + factor(date), data = AfricaVariables, inde...
https://stackoverflow.com/questions/77641558/fixed-effects-with-plm-problem-with-nans
r, statistics, plm
1,702,318,315
se_77641464
stackoverflow
DATA_SCIENCE
Generating a PDF from Monte carlo Simulation
Generating a PDF from Monte carlo Simulation If I have an analytical pdf of a generated random variable like this y= (x**(d-1)*e**(-x/g))/(math.gamma(d)*g**d) where d and g are constants How to generate this pdf using the Monte-Carlo simulation I substitute with x in the analytical equation and the PDF is generated, ...
https://stackoverflow.com/questions/77641464/generating-a-pdf-from-monte-carlo-simulation
python, python-3.x, python-2.7, statistics, static-analysis
1,702,317,244
se_77607482
stackoverflow
DATA_SCIENCE
Group based trajectory modeling in R
Group based trajectory modeling in R I have a dataset consisting of 3 variables one ID, on variable Y, and time variable t. It is in long form with each subject having several rows of registrations with the ordinal variable Y (1-5) and time of registration with the first registration being 0 and the rest in months sin...
https://stackoverflow.com/questions/77607482/group-based-trajectory-modeling-in-r
r, statistics, longitudinal
1,701,791,067
se_13560138
stackoverflow
DATA_SCIENCE
Calculate statistics on arrays
Calculate statistics on arrays I'm building a web app that needs to calculate statistics on a data set. I need to calculate percentiles, averages, modes, and other statistical functions on arrays. Normally in Python, I would just use scipy, numpy, or nltk which has a huge library of stat array functions. Are there an...
https://stackoverflow.com/questions/13560138/calculate-statistics-on-arrays
ruby, statistics
1,353,913,600
se_77634551
stackoverflow
DATA_SCIENCE
Pandas groupby() mean questions
Pandas groupby() mean questions so I have a CSV file that has a [] of districts printed as columns that contain that contain rows of numerical data; I am wanting to derive a mean for each column iterated. import pandas as pd data = pd.read_csv('ny_data.csv') df = pd.DataFrame(data, columns=["Upper Manhattan", "Inwood...
https://stackoverflow.com/questions/77634551/pandas-groupby-mean-questions
python, pandas, csv, statistics, mean
1,702,206,952
se_77637992
stackoverflow
DATA_SCIENCE
How to estimate the similarity between different cubic curves using R
How to estimate the similarity between different cubic curves using R enter image description hereAll three variables were able to fit a cubic functional relationship with the buffer distance, and in order to estimate the relationship between the changes of these three variables because these curves are relatively sim...
https://stackoverflow.com/questions/77637992/how-to-estimate-the-similarity-between-different-cubic-curves-using-r
r, statistics
1,702,279,394
se_75804686
stackoverflow
DATA_SCIENCE
R-Squared (Coefficient of determination) range beyond 0 and 1?
R-Squared (Coefficient of determination) range beyond 0 and 1? I was under the impression that the R-squared value is bound between 0 and 1. However after reading some online literature/forums and also some personal experience, I now feel that the R-squared value (coefficient of determination) is: a) bound between neg...
https://stackoverflow.com/questions/75804686/r-squared-coefficient-of-determination-range-beyond-0-and-1
statistics, coefficient-of-determination
1,679,420,578
se_24432101
stackoverflow
DATA_SCIENCE
Correlation coefficients and p values for all pairs of rows of a matrix
Correlation coefficients and p values for all pairs of rows of a matrix I have a matrix data with m rows and n columns. I used to compute the correlation coefficients between all pairs of rows using np.corrcoef: import numpy as np data = np.array([[0, 1, -1], [0, -1, 1]]) np.corrcoef(data) Now I would also like to ...
https://stackoverflow.com/questions/24432101/correlation-coefficients-and-p-values-for-all-pairs-of-rows-of-a-matrix
python, numpy, statistics, scipy, correlation
1,403,789,960
se_77626389
stackoverflow
DATA_SCIENCE
Correct way to combine Normal distributions in Julia with Distributions.jl
Correct way to combine Normal distributions in Julia with Distributions.jl I have two multivariate normal distributions like such: using Distributions, LinearAlgebra g1 = MvNormal([1,2], [2 1; 1 2]) A = [3 1; 1 3] B = [[A [0;0]]; transpose([0,0,1])] g2 = MvNormal([1,2,3], B) I would like to combine them into a new di...
https://stackoverflow.com/questions/77626389/correct-way-to-combine-normal-distributions-in-julia-with-distributions-jl
statistics, julia, normal-distribution
1,702,036,792
se_74202417
stackoverflow
DATA_SCIENCE
Stratified sampling for semantic segmentation
Stratified sampling for semantic segmentation I have a set of images and multi-label masks (an image usually has segments of more than one class) and I would like to split it into train and validation sets. The data is imbalanced, where two of the classes appear in about 1% of the images and the other 2 classes have a...
https://stackoverflow.com/questions/74202417/stratified-sampling-for-semantic-segmentation
statistics, sampling, multilabel-classification, semantic-segmentation, imbalanced-data
1,666,755,266
se_77626398
stackoverflow
DATA_SCIENCE
How to tell how close we are to a GC for java processes?
How to tell how close we are to a GC for java processes? I'm currently implementing some revisions in my ongoing project and I'm curious about their potential impact on garbage collection metrics. Specifically, I'm interested in continuing a custom paradigm for the project, that is, avoiding any GC activity during a s...
https://stackoverflow.com/questions/77626398/how-to-tell-how-close-we-are-to-a-gc-for-java-processes
java, statistics, garbage-collection, heap-memory
1,702,036,853
se_77623100
stackoverflow
DATA_SCIENCE
Logic Error sampling distribution of proportions
Logic Error sampling distribution of proportions The problem states the following: A sample of 200 pieces has been taken, 10 % of produced units are not working ¿What's the probability that i / 200 pieces don't work? Where i is an integer that takes numbers from 1 to 100 I tried to solve this, using the following code...
https://stackoverflow.com/questions/77623100/logic-error-sampling-distribution-of-proportions
pandas, numpy, matplotlib, scipy, statistics
1,701,983,612
se_77622477
stackoverflow
DATA_SCIENCE
Efficiently calculating autocorrelations and cross-correlations from high-dimensional time-series with Python?
Efficiently calculating autocorrelations and cross-correlations from high-dimensional time-series with Python? I have a coordinate array of shape X.shape = (100000, 1000) and a property array of shape P.shape = (100000, 1000). I wish to calculate the distance dependent autocorrelation function of property P which I ex...
https://stackoverflow.com/questions/77622477/efficiently-calculating-autocorrelations-and-cross-correlations-from-high-dimens
python, numpy, parallel-processing, statistics
1,701,975,173
se_77616254
stackoverflow
DATA_SCIENCE
Python + Excel - deriving a correlated mean from 2 data groups?
Python + Excel - deriving a correlated mean from 2 data groups? What I'm doing - I have two columns in Excel: price and borough(British for district). I've generated the overall data set using python too, so I already have a list composed of the various boroughs. I want a breakdown of the mean price for each value ass...
https://stackoverflow.com/questions/77616254/python-excel-deriving-a-correlated-mean-from-2-data-groups
python, excel, dataframe, statistics
1,701,896,168
se_76739633
stackoverflow
DATA_SCIENCE
Rearrange the order of nodes in a sankey diagram using ggsankey
Rearrange the order of nodes in a sankey diagram using ggsankey I did a sankey diagram in R using the ggsankey package and everything is fine, only detail is I want to rearrenge the order of the nodes in the second level (right now it is arranged SD, PR, DP, and CR from top to bottom and i want them to appear CR, PR, ...
https://stackoverflow.com/questions/76739633/rearrange-the-order-of-nodes-in-a-sankey-diagram-using-ggsankey
r, ggplot2, statistics, sankey-diagram
1,689,956,219
se_77609246
stackoverflow
DATA_SCIENCE
How to predict a single value with regression model?
How to predict a single value with regression model? I need to find expected brain mass for some picked body mass value. Y = df_grouped_pow[['Brain mass (g)']] X = sm.add_constant(a * np.power(Y, b)) model_pow = sm.OLS(Y, X) result = model_pow.fit(); print(result.summary()) (a and b are previously calculated values....
https://stackoverflow.com/questions/77609246/how-to-predict-a-single-value-with-regression-model
python, statistics
1,701,810,550
se_77518513
stackoverflow
DATA_SCIENCE
How do I analyze data for multilevel pairwise comparisons?
How do I analyze data for multilevel pairwise comparisons? I am trying to run a study using Pairwise comparisons. Essentially, I have two groups of images: Group A (containing 107 different images) and Group B (containing 100 different images). Participants will view two images at a time (one from Group A and one from...
https://stackoverflow.com/questions/77518513/how-do-i-analyze-data-for-multilevel-pairwise-comparisons
statistics, comparison, group, pairwise
1,700,509,715
se_44742122
stackoverflow
DATA_SCIENCE
How does regularization parameter work in regularization?
How does regularization parameter work in regularization? In machine learning cost function, if we want to minimize the influence of two parameters, let's say theta3 and theta4, it seems like we have to give a large value of regularization parameter just like the equation below. I am not quite sure why the bigger r...
https://stackoverflow.com/questions/44742122/how-does-regularization-parameter-work-in-regularization
machine-learning, statistics
1,498,350,401
se_60918062
stackoverflow
DATA_SCIENCE
Testing for interactions using the aligned rank transformation test (non-parametric two-way ANOVA)
Testing for interactions using the aligned rank transformation test (non-parametric two-way ANOVA) I am completing an aligned rank transformation as follows, using the ARTool package: model = art(Proportioncorrect~Trialtype+Method+Trialtype:Method,data=Cummulativecounting) I have two factors (independent variables), ...
https://stackoverflow.com/questions/60918062/testing-for-interactions-using-the-aligned-rank-transformation-test-non-paramet
r, statistics, anova, interaction, posthoc
1,585,502,657
se_67923985
stackoverflow
DATA_SCIENCE
StandardScaler.inverse_transform() return the same array as input :/ Is sklearn broken or am I?
StandardScaler.inverse_transform() return the same array as input :/ Is sklearn broken or am I? Good evening, I'm currently pursuing a PhD in chemistry and in this framework I'm trying to apply my few knowledge in python and stats to discriminate sample based on their IR spectrum. After a few of weeks of data acquisit...
https://stackoverflow.com/questions/67923985/standardscaler-inverse-transform-return-the-same-array-as-input-is-sklearn
python, syntax, statistics, sklearn-pandas
1,623,337,998
se_77574316
stackoverflow
DATA_SCIENCE
How to use R function tableby() to get the strata printed as extra columns instead of extra rows, or another way to accomplish the same thing?
How to use R function tableby() to get the strata printed as extra columns instead of extra rows, or another way to accomplish the same thing? I would like to use the R function tableby() to get the strata printed as extra columns instead of extra rows, or find another way to accomplish the same thing. I show an examp...
https://stackoverflow.com/questions/77574316/how-to-use-r-function-tableby-to-get-the-strata-printed-as-extra-columns-inste
r, statistics, r-markdown
1,701,289,715
se_77580187
stackoverflow
DATA_SCIENCE
Mixed effect model in python
Mixed effect model in python Hi i have a certain task i want to solve: i have this task: For two months, participants played an app, in which they played 5 different therapeutic games (TGs). At the beginning of each session, they also completed a 5-scale State-of-Mind questionnaire, rating the extent to which they fee...
https://stackoverflow.com/questions/77580187/mixed-effect-model-in-python
python, statistics, regression, statsmodels
1,701,362,718
se_77587228
stackoverflow
DATA_SCIENCE
weighted pearson correlation coefficent with two sample sizes
weighted pearson correlation coefficent with two sample sizes I have a dataframe with var1 and var1 nvar1 and nvar2 I want to get the weighted square of the pearson correlation coefficent between var1 and var2 weighted by the same sizes (nvar1 and nvar2) # Create a mock DataFrame df <- data.frame( var1 = rnorm(100),...
https://stackoverflow.com/questions/77587228/weighted-pearson-correlation-coefficent-with-two-sample-sizes
r, statistics, correlation
1,701,453,799
se_77580376
stackoverflow
DATA_SCIENCE
How do I easily plot data in R (line plot), that were adjusted for confounding variables?
How do I easily plot data in R (line plot), that were adjusted for confounding variables? since I now understand how to line plot data with multiple timepoints in R using ggpubr package, I want to plot data that has been adjusted for some known confounding variables in the data set. What I already tried is to calculat...
https://stackoverflow.com/questions/77580376/how-do-i-easily-plot-data-in-r-line-plot-that-were-adjusted-for-confounding-v
r, ggplot2, statistics, data-analysis, adjustment
1,701,364,126
se_68886403
stackoverflow
DATA_SCIENCE
How to find the similarity between two differently sized distributions?
How to find the similarity between two differently sized distributions? I have two differently sized (different number of samples) waves that are currently stored as lists of numbers. Is there a mathematical formula to measure the similarity between them? For example: Wave 1 : 1016 samples Wave 2 : 512 samples ``` w...
https://stackoverflow.com/questions/68886403/how-to-find-the-similarity-between-two-differently-sized-distributions
python, statistics, signal-processing, radio-transmission
1,629,682,359
se_77570149
stackoverflow
DATA_SCIENCE
Generation of random samples from a mixture of the independent and the comonotonic copula
Generation of random samples from a mixture of the independent and the comonotonic copula Dear Stack Overflow community: I am working in R, and I need to create random samples from a mixture of two trivariate copulas: C(u1, u2, u3) = w* C_independence (u1, u2, u3) + (1 - w) * C_comonotonic(u1, u2, u3) Let's assume tha...
https://stackoverflow.com/questions/77570149/generation-of-random-samples-from-a-mixture-of-the-independent-and-the-comonoton
r, statistics, simulation, copula
1,701,252,083
se_76478554
stackoverflow
DATA_SCIENCE
Weighted Wilcoxon Rank-Sum test in Python
Weighted Wilcoxon Rank-Sum test in Python I have some ordinal data that I want to run a Wilcoxon Rank-Sum test between two groups (say male vs female). However, for other categories (such as age) there is some unbalancing between the population proportions and the sample that I got, therefore I wanted to apply some we...
https://stackoverflow.com/questions/76478554/weighted-wilcoxon-rank-sum-test-in-python
python, statistics, hypothesis-test, scipy.stats
1,686,793,493
se_77566350
stackoverflow
DATA_SCIENCE
Datacenter Job Scheduling using Genetic Algorithm or Linear Programming
Datacenter Job Scheduling using Genetic Algorithm or Linear Programming I'm looking for some advice for an optimization problem regarding scheduling jobs in a datacenter. So I have a list of jobs and each job has a required time for finishing and a number of cores it has to run on, e.g. job 1 needs 10 seconds and has ...
https://stackoverflow.com/questions/77566350/datacenter-job-scheduling-using-genetic-algorithm-or-linear-programming
optimization, statistics, mathematical-optimization, linear-programming, genetic-algorithm
1,701,196,479
se_76691446
stackoverflow
DATA_SCIENCE
How to use statsmodels get_rdataset?
How to use statsmodels get_rdataset? Python's statsmodels library has get_rdataset() method that can fetch various datasets. Where is the list of datasets that can be fetched? How do I use it to load datasets? The documentation has no mention of which datasets are available. It merely says that dataname: The name of t...
https://stackoverflow.com/questions/76691446/how-to-use-statsmodels-get-rdataset
python, statistics, statsmodels
1,689,374,013
se_77531415
stackoverflow
DATA_SCIENCE
SAS basic analysis problems
SAS basic analysis problems first time SAS user here. I have a dataset (plant) imported to SAS where I changed two variables from numeric to categorical. I managed to fit my model like so: proc glm data=plant_formatted; class dose_factor greenhouse_factor; model growth = dose_factor light_intensity greenhouse_...
https://stackoverflow.com/questions/77531415/sas-basic-analysis-problems
statistics, sas
1,700,668,581
se_77558070
stackoverflow
DATA_SCIENCE
Calculate correlation in R (as.factor, as.numric)
Calculate correlation in R (as.factor, as.numric) I need to calculate a correlation between the variable 'self-confidence' (continuous) and the variable 'gender' to see if I need to include it as a possible covariate in my analysis. I have to calculate a Pearson correlation. I have used the following code for the vari...
https://stackoverflow.com/questions/77558070/calculate-correlation-in-r-as-factor-as-numric
r, statistics
1,701,098,810
se_77556760
stackoverflow
DATA_SCIENCE
C_qf function - base stats packages
C_qf function - base stats packages I have been running a piece of code which uses the gamlss qEGB2() function. However, it has been producing the following warning message: In qf(p, 2 * nu, 2 * tau) : full precision may not have been achieved in 'qbeta' When stepping into the qf function (within the qEGB2 function),...
https://stackoverflow.com/questions/77556760/c-qf-function-base-stats-packages
r, statistics, distribution
1,701,086,755
se_77554553
stackoverflow
DATA_SCIENCE
Postgresql - Create multicolumn Index - statistics created or not
Postgresql - Create multicolumn Index - statistics created or not In Mssql, when we create multi column index, it itself creates multicolumn stats on those columns. In postgresql, are multicolumn stats created or not
https://stackoverflow.com/questions/77554553/postgresql-create-multicolumn-index-statistics-created-or-not
postgresql, statistics
1,701,060,171
se_48215526
stackoverflow
DATA_SCIENCE
Can Kruskal-Wallis test be used to test significance of multiple groups within multiple factors?
Can Kruskal-Wallis test be used to test significance of multiple groups within multiple factors? I have tried to read what I can on Kruskal-Wallis and while I have found some useful information, I still seem to not find the answer to my question. I am trying to use the Kruskal-Wallis test to determine the significance...
https://stackoverflow.com/questions/48215526/can-kruskal-wallis-test-be-used-to-test-significance-of-multiple-groups-within-m
r, statistics, multivariate-testing, hypothesis-test, kruskal-wallis
1,515,703,607
se_77549397
stackoverflow
DATA_SCIENCE
&quot;Full rank&quot; error when estimating OLS with statsmodel
&quot;Full rank&quot; error when estimating OLS with statsmodel I have historical data for crop yield, annual temperature and annual precipitation for a given region. My goal is to estimate the following linear model: In which y is the crop annual yield, t stands for time (year), tmp for temperature (annual average)...
https://stackoverflow.com/questions/77549397/full-rank-error-when-estimating-ols-with-statsmodel
python, statistics, regression, linear-regression, modeling
1,700,942,024
se_72661486
stackoverflow
DATA_SCIENCE
Getting a series of Normal Distributions from a Least Squares regression
Getting a series of Normal Distributions from a Least Squares regression I am not particularly good at math. I would like to get some breadcrumbs about how to solve the following formula using python code. Assume an [m,n] matrix M and a [1,n] vector y. Solve for the least squares using scipy.linalg.lstsq(M, y). The o...
https://stackoverflow.com/questions/72661486/getting-a-series-of-normal-distributions-from-a-least-squares-regression
python, scipy, statistics, regression, gaussian
1,655,478,902
se_76909842
stackoverflow
DATA_SCIENCE
Calculating the population inside and outside a buffer
Calculating the population inside and outside a buffer I have to calculate the population inside 1000m cells. The total population inside the cell in the images below is 2306. enter image description here enter image description here The green is the buffer from a point. The orange falls outside the buffer. The popula...
https://stackoverflow.com/questions/76909842/calculating-the-population-inside-and-outside-a-buffer
statistics, buffer, arcgis
1,692,146,580
se_77545293
stackoverflow
DATA_SCIENCE
Analyzing Impact of a Single Independent Time Series Variable on a Cluster of Dependent Variables in R
Analyzing Impact of a Single Independent Time Series Variable on a Cluster of Dependent Variables in R Hello Stack Overflow Community, I am an economic researcher seeking statistical advice for an analysis I am conducting in R. My dataset includes one independent time series variable, X, and a large cluster of depende...
https://stackoverflow.com/questions/77545293/analyzing-impact-of-a-single-independent-time-series-variable-on-a-cluster-of-de
r, statistics, time-series, correlation, causality
1,700,853,883
se_77543887
stackoverflow
DATA_SCIENCE
pandas cut function&#39;s output is not understandable
pandas cut function&#39;s output is not understandable ı want create frequency table with pandas ı tried this code but ı dont understand output also ı want change class range data: Rank 1 18.42 2 20.93 3 31.50 4 23.99 5 5.65 ... 96 11.40 97 5.14 98 15.30 99 12.99 100...
https://stackoverflow.com/questions/77543887/pandas-cut-functions-output-is-not-understandable
python, pandas, dataframe, statistics, frequency-distribution
1,700,836,450
se_77539871
stackoverflow
DATA_SCIENCE
How do I create a Python Lambda lambda function to do this?
How do I create a Python Lambda lambda function to do this? I have a dataframe which has a mean and standard deviation and I want to create a lambda function, or some other method, to contain the 1% Value at Risk level. The function for a scalar for what I want to do is var01 = norm.ppf(.01,Return,Vol) The dataframe ...
https://stackoverflow.com/questions/77539871/how-do-i-create-a-python-lambda-lambda-function-to-do-this
python, pandas, dataframe, statistics
1,700,778,337
se_77531202
stackoverflow
DATA_SCIENCE
Is there a way to calculate a multiple moving averages based on an ID and data frame in R?
Is there a way to calculate a multiple moving averages based on an ID and data frame in R? I am analyzing data and would like to calculate many moving averages at once. I will past here an example of what I am trying to do. Table 1: IDs and Day IDDate <- data.frame(ID = c("A","B","C"), Stage1 = c(12, 13, 10), Stage2...
https://stackoverflow.com/questions/77531202/is-there-a-way-to-calculate-a-multiple-moving-averages-based-on-an-id-and-data-f
r, statistics, average, moving-average
1,700,666,716
se_53103834
stackoverflow
DATA_SCIENCE
How can I find the source code for scipy.stats.mvn?
How can I find the source code for scipy.stats.mvn? I was using the function mvn.mvnun() in the scipy.stats module to calculate the CDF of a given multivariate normal distribution in my paper. The reviewer asked me how I estimated the CDF since the CDF has no closed-form. I guess a sampling method might be used. To fi...
https://stackoverflow.com/questions/53103834/how-can-i-find-the-source-code-for-scipy-stats-mvn
python, scipy, statistics, probability-theory
1,541,084,279
se_77524551
stackoverflow
DATA_SCIENCE
Age standarised mortality rate by age group and by year in r
Age standarised mortality rate by age group and by year in r I need help calculating a separate Age standardised mortality rate (Directly Standardised Rate) for males/females and by agegroup1 for 2011 to 2017 with 95%CI. I need to show this in line graphs as shown below in the picture. Any help would be much appreciat...
https://stackoverflow.com/questions/77524551/age-standarised-mortality-rate-by-age-group-and-by-year-in-r
r, ggplot2, statistics
1,700,585,192
se_77520494
stackoverflow
DATA_SCIENCE
Iterate a stats function over a row of a dataframe in pandas
Iterate a stats function over a row of a dataframe in pandas I have a dataframe that looks like the table below. I want to create a new row called Ploss is the Normal Distribution function using Return as the mean and the Vol row as the standard deviation. Here is the function call I tried Ploss=NormalDist(df.loc['R...
https://stackoverflow.com/questions/77520494/iterate-a-stats-function-over-a-row-of-a-dataframe-in-pandas
pandas, statistics
1,700,544,561
se_63165775
stackoverflow
DATA_SCIENCE
How to calculate the confidence intervals for prediction in Regression? and also how to plot it in python
How to calculate the confidence intervals for prediction in Regression? and also how to plot it in python Fig 7.1, An Introduction To Statistical Learning I am currently studying a book named Introduction to Statistical Learning with applications in R, and also converting the solutions to python language. I am not ab...
https://stackoverflow.com/questions/63165775/how-to-calculate-the-confidence-intervals-for-prediction-in-regression-and-also
matplotlib, machine-learning, statistics, linear-regression, confidence-interval
1,596,079,827
se_13040246
stackoverflow
DATA_SCIENCE
Select random row from a PostgreSQL table with weighted row probabilities
Select random row from a PostgreSQL table with weighted row probabilities Example input: SELECT * FROM test; id | percent ----+---------- 1 | 50 2 | 35 3 | 15 (3 rows) How would you write such query, that on average 50% of time i could get the row with id=1, 35% of time row with id=2, and 15% of t...
https://stackoverflow.com/questions/13040246/select-random-row-from-a-postgresql-table-with-weighted-row-probabilities
sql, postgresql, statistics, probability
1,351,030,947
se_77519208
stackoverflow
DATA_SCIENCE
R function call in error using mixR package
R function call in error using mixR package I have a dataframe and I want to fit a mixR model for each column and print the plot. The code without using function without any problem, but when it was called in a function, an error happened. I checked them multiple times, but not able to find any abnormality. Any hint? ...
https://stackoverflow.com/questions/77519208/r-function-call-in-error-using-mixr-package
r, function, error-handling, statistics, function-call
1,700,518,476
se_77519158
stackoverflow
DATA_SCIENCE
Are there any distributions such that parameters have multimodal posteriors in Bayesian MCMC?
Are there any distributions such that parameters have multimodal posteriors in Bayesian MCMC? I want to test a new idea I have for Bayesian MCMC, but it'd only be useful with multimodal posteriors. Are there any examples of such distributions? For instance, with a gaussian mixture model, of course the distribution its...
https://stackoverflow.com/questions/77519158/are-there-any-distributions-such-that-parameters-have-multimodal-posteriors-in-b
statistics, bayesian, mcmc
1,700,517,596
se_73897820
stackoverflow
DATA_SCIENCE
get the median in sql
get the median in sql i have a question, i was solving a problem of hackerank sql, the problem is the following: A median is defined as a number separating the higher half of a data set from the lower half. Query the median of the Northern Latitudes (LAT_N) from STATION and round your answer to 4 decimal places. the...
https://stackoverflow.com/questions/73897820/get-the-median-in-sql
mysql, sql, statistics, median
1,664,464,096
se_77333679
stackoverflow
DATA_SCIENCE
Getting a different kurtosis from numpy array method than from Summary
Getting a different kurtosis from numpy array method than from Summary I have to extract information from the OLS statsmodel summary. While doing it, the Kurtosis results from the summary is different than the array method kurtosis(). Here is the code: from sklearn.datasets import load_diabetes import pandas as pd imp...
https://stackoverflow.com/questions/77333679/getting-a-different-kurtosis-from-numpy-array-method-than-from-summary
numpy, scipy, statistics, linear-regression, statsmodels
1,697,834,563
se_77513063
stackoverflow
DATA_SCIENCE
Implementing covariance by hand
Implementing covariance by hand I made a curious observation today - I implemented the covariance of two vectors 3 different ways, and got 2 different answers. In R, methods 1 and 2 are the same. Method 3 ought to be mathematically the same, but somehow it returns a different number. What is the bug here? # Make some ...
https://stackoverflow.com/questions/77513063/implementing-covariance-by-hand
r, statistics, covariance
1,700,441,705
se_21030391
stackoverflow
DATA_SCIENCE
How to normalize a numpy array to a unit vector
How to normalize a numpy array to a unit vector I would like to convert a NumPy array to a unit vector. More specifically, I am looking for an equivalent version of this normalisation function: def normalize(v): norm = np.linalg.norm(v) if norm == 0: return v return v / norm This function handles ...
https://stackoverflow.com/questions/21030391/how-to-normalize-a-numpy-array-to-a-unit-vector
python, numpy, scikit-learn, statistics, normalization
1,389,299,103
se_77506368
stackoverflow
DATA_SCIENCE
Interpreting y axis in density plot
Interpreting y axis in density plot 200 people were tested, 20 of those were infected. I want to get a posterior distribution for the uncertainty associated with the probability that a person is infected. I do this like this: n<-200 s<-20 p<-seq(0,0.3,0.001) dp<-dbeta(p, s+1, n-s+1) But then when I plot it, I don't ...
https://stackoverflow.com/questions/77506368/interpreting-y-axis-in-density-plot
r, statistics, probability-density, density-plot, beta-distribution
1,700,300,577
se_77508049
stackoverflow
DATA_SCIENCE
How to select 0.000 but not 0 in R?
How to select 0.000 but not 0 in R? I have a vector of p-values, some of them are 0.000, and some of them are 0. How do I select 0.000, but not 0 because exact 0 doesn't make sense to me. I tried the code below, but it regards 0.000 and 0 as the same value. Any hint or respons will be appreciated. Thanks. p = c(0,0,0....
https://stackoverflow.com/questions/77508049/how-to-select-0-000-but-not-0-in-r
r, select, statistics, p-value
1,700,329,403
se_77500548
stackoverflow
DATA_SCIENCE
Simple percentage computation inside a table direct in Microsort Word
Simple percentage computation inside a table direct in Microsort Word For one of my customers I need to constantly update a word document with statistics. The statistics are very simple and are basically just a bunch of several tables with frequency counts and the corresponding percentages. As it is very error prone a...
https://stackoverflow.com/questions/77500548/simple-percentage-computation-inside-a-table-direct-in-microsort-word
ms-word, statistics
1,700,213,271
se_77107822
stackoverflow
DATA_SCIENCE
How to do a Yule-Walker analysis in Julia
How to do a Yule-Walker analysis in Julia Is there a method in Julia to perform a Yule-Walker analysis similar to the equivalent method in Python statsmodels.regression.linear_model.yule_walker ?
https://stackoverflow.com/questions/77107822/how-to-do-a-yule-walker-analysis-in-julia
statistics, time-series, julia
1,694,719,079
se_69942339
stackoverflow
DATA_SCIENCE
Understanding the output of my Ramsey RESET test
Understanding the output of my Ramsey RESET test I am new to R, and doing a replication study where I need to check if their regression holds for the classical assumption for OLS. For the specification assumption, I am doing the Ramsey RESET test, here is my code: simple_model <- lm(deploy ~ loggdppc + natoyears + mil...
https://stackoverflow.com/questions/69942339/understanding-the-output-of-my-ramsey-reset-test
r, statistics, linear-regression
1,636,717,056
se_77505199
stackoverflow
DATA_SCIENCE
Convert a list with a sum of 1 and keep the relations between the values
Convert a list with a sum of 1 and keep the relations between the values Assume there is a list[int] like this: [0, 2, 3, 3, 0, 9] I want to convert it to list[float] with a sum of 1 and keep the relations between the values: [a, b, c, d, e, f] # a = e = 0 # c = d # f = 4.5b = 3c = 3d # a + b + c + d + e + f = 1 [0...
https://stackoverflow.com/questions/77505199/convert-a-list-with-a-sum-of-1-and-keep-the-relations-between-the-values
python, math, statistics, probability
1,700,266,196
se_77488028
stackoverflow
DATA_SCIENCE
DAX statistics calculation
DAX statistics calculation The problem is solved! Sam Nseir has found a solution! [I am currently analyzing a survey (approx.60.0000 respondents in 30 European countries) on the topic of xenophobia. More precisely: how many women and men in each country (in % of the sample) are xenophobic. Ive checked a bit of this d...
https://stackoverflow.com/questions/77488028/dax-statistics-calculation
statistics, dax
1,700,054,356
se_2374640
stackoverflow
DATA_SCIENCE
How do I calculate percentiles with python/numpy?
How do I calculate percentiles with python/numpy? Is there a convenient way to calculate percentiles for a sequence or single-dimensional numpy array? I am looking for something similar to Excel's percentile function.
https://stackoverflow.com/questions/2374640/how-do-i-calculate-percentiles-with-python-numpy
python, numpy, statistics, quantile, percentile
1,267,647,673