Questions tagged [statistics]
Consider whether your question would be better asked at https://stats.stackexchange.com. Statistics is the mathematical study of using probability to infer characteristics of a population from a limited number of samples or observations.
15,004
questions
0
votes
0
answers
5
views
bar plot in 3d following a given line
I want to draw a bar plot in 3d. I know how to do that using the following code:
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure(figsize=(10,...
-2
votes
0
answers
19
views
summarizing a vector of numbers into a data frame representing a frequency table with k classes
I am trying to write this function, and what bugs me is that the second input seems a little bit confusing to me. can anyone work this out?
Input:
x - a vector of numeric data of any length
k – an ...
0
votes
0
answers
6
views
Normality Assumption - how to check you have not violated it?
I am rleatively new to statistics and am stuggling with the normality assumption.
I understand that parametric tests are underpinned by the assumption that the data is normally distributed, but there ...
0
votes
2
answers
29
views
describe( ) method gives false 75% quantile
Xi = pd.DataFrame([("Guyana", 5.78, 6.89), ("Paraguay", 7.29, 8.5), ("Ecuador", 9.35, 10.92), ("Peru", 9.96, 11.55), ("Kolumbien", 10.9, 12.71),
...
0
votes
3
answers
45
views
Dplyr: How To Add a Column of Observations For Summary Statistics Tables in R (Mean, Median, SE, and CV)
Issue:
I have created a table of summary of descriptive statistics for seven acoustic parameters that were measured in a spectrogram (see below). I would like to add a column that shows the number of ...
0
votes
2
answers
24
views
How to scale a barplot in ggplot2 with two variables when one variable is of the order of 1000 times smaller than the other?
I am comparing the execution times of binary search and linear search and displaying them using a bar plot.
But since the execution times of binary search are almost 1000 times less than linear search,...
0
votes
0
answers
18
views
pymongo - How to check basic statistics?
I want to see the statistics of all data in a collection. I want the same result as the describe function in Python Pandas (statistics on multiple columns, not just one column). Using aggregate by ...
0
votes
0
answers
18
views
getting different values for variance when calculating manually and with numpy in python
I have to calculate the variance for the list of following numbers = [6,9,14,10,5,8,11], when i calculate it manually as shown in below picture
I'm getting variance as 9.3, but at the same time when i ...
0
votes
0
answers
21
views
Why the t-test for the difference of two means is not suitable for multiple comparisons?
The ANOVA table F test is the most suitable procedure for data analysis in experimentation when more than two means are to be compared. From a statistical point of view, why the t-test for the ...
1
vote
0
answers
78
views
Is Delphi's Skewness correct
In Delphi one can calculate Skewness using System.Math's function MomentSkewKurtosis().
var m1, m2, m3, m4, skew, k: Extended;
System.Math.MomentSkewKurtosis([1.1,
3.345,
12.234,
11.945,
14....
-1
votes
0
answers
8
views
How to implement Somer's D in python?
Can you suggest me some blogs or articles to understand Somers D with prerequisites.
0
votes
1
answer
37
views
How do you solve this R poisson distribution problem?
Here is my attempt at this problem:
Consider a restaurant that is open from 3pm to 11PM (i.e., 6 hours) each day. Now assume the number of guests arriving at the restaurant each hour follows a ...
0
votes
1
answer
35
views
Customer retention rate in snowflake
I have this formula for the customer retention rate but kinda stuck in translating it into a sql code in snowflake:
Customer Retention rate: number of customers who purchased in the past AND in the ...
0
votes
0
answers
18
views
Change in R squared [migrated]
I am running a regression to test how different attributes affect house prices. These attributes have been separated into three categories that are: structural factors (number of room, size, square ...
-1
votes
0
answers
9
views
What is the appropriate test for this type of dataset? [migrated]
I was wondering which is the best test for a dataset like this
Variable Value Group
University degrees 0.12 City A
University degrees 0.33 City B
...
0
votes
0
answers
19
views
How to choose between one-way, two-anova and multliple regression? [migrated]
I am working on the data set that consists of Patients' id (after stroke), Time (they can walk after going through the program), the Program they follow and the Visit number when the Time was measured....
0
votes
0
answers
25
views
How to test for normality of a group contain data equals zero, by shapiro wilk test? is it not normally distributed , or normally? [closed]
I have a group that contains zero data, and I want to know whether it is considered normally or not normally distributed.
I used the SPSS software, and it showed this result
SPSS Normality test
I also ...
-2
votes
0
answers
23
views
how to calculate the correlation of two two-dimensional arrays?
I have two 100x100 2D arrays a and b, and I want to calculate the total correlation of a and b, returning an r and a p.
I did this in matlab with corrcoef, but I don't seem to find anything like it in ...
-1
votes
0
answers
19
views
Best way to assign row of data to a group based on the values of other known groups? [closed]
I have a few hundred rows of data that includes the following columns
One of 2 species’ names, or no name if the species is unknown (Unknown species have to be one of the 2 known species, they just ...
-2
votes
0
answers
16
views
Do Statistics equal to Data Science? [closed]
Do Statistics equal to Data Science? I am in Statistics stream, I'm learning Data Science on my own. It seems the same but seems to be different.
1
vote
2
answers
34
views
How to extract lower and upper bounds from confidence level in R from t test function?
I used the following code to retrieve a confidence level for my data:
out <- t.test(my_data$my_col, conf.level = 0.95)
out
This returns something like:
data: my_data$my_column
t = 30, df = 20, p-...
-2
votes
0
answers
28
views
plot the product of two t-distribution in 3d python
Can someone help me plot in python something that resembles to this?
[1]: https://i.stack.imgur.com/ccVbq.png
In my case the X axis is a t distribution. Same for Y axis.
Z is the product of X and Y
To ...
0
votes
0
answers
37
views
Plotting p-value/significance symbol in between group
Apart from the p-value that I got from running general ANOVA (p=0.034*), which is significant and manually annotated in my bar chart. I would also like to find and include the p-values/ significance ...
1
vote
1
answer
25
views
Function to Conduct a Kruskal Wallis Tests for Multiple Comparison of Variables using R
Issue:
I have a dataset that doesn't meet the assumptions to conduct an ANOVA, so I need to conduct a non-parametric alternative such as the Kruskal Wallis test. Overall, I have seven parameters and I ...
0
votes
1
answer
35
views
Dplyr: Production of a Summary Descriptive Statistics Table (Standard error and Coefficient of Variation) for Multiple Variables
Issue:
I have a data frame called 'New_Acoustic_Parameters' that contains seven variables (see the structure of data below) that I would like to produce a summary table of descriptive statistics (mean,...
-1
votes
0
answers
10
views
What is the relation between sales data and numeric distribution?
I have monthly wise sales data, numeric distribution, weighted distribution for 3 years. What kind do analysis I can do on this data.
0
votes
0
answers
9
views
What is the Physical and statistical meaning of the Nakagami-m parameter (m-parameter and omega)? [migrated]
I have generated a signal of 5000 samples composed from a Nakagami distribution (m=15, omega=1) superposed with a Normal distribution(1.2*Ones(1,5000)). The resulting signal is filtered using a moving ...
-1
votes
0
answers
8
views
Could someone tell me solution for this question. I want unbiased estimator for the following question I have attached here
I want to find the unbiased estimator or the solution for the following question
0
votes
0
answers
18
views
How to check for unit root in Panel Data using Python?
I am working on time series analysis and I have sales data (lets call it df_panel as we panel data structure) for 700 individual areas for each month of 2021. e.g.
Area
Month
Sales
Area 1
January
...
1
vote
1
answer
24
views
p-value borderline significant? Further study?
I am learning about AB testing and have run into some questions.
In the events of borderline significant p-value, say p = 0.049 and p = 0.051, is it really that different?
In the events of that I have ...
-3
votes
0
answers
18
views
I need a skills command on python [closed]
I am creating a game through python that has certain skills that can be improved through certain activities. I am coming here to see if anyone has a base code the use, or if I should just go and make ...
1
vote
1
answer
35
views
How to run a set of functions over given list of variable names and write the output to a table?
What I'm seeking to do is run a mean/standard deviation calculation, as well as a statistical test, along a set of variables. What seems right to do is build the function such that one can pass the ...
-2
votes
0
answers
19
views
Filtering in array based on a percentage condition in Python
I have an array sorted in ascending order. I want to filter the maximum value as the first value and there after have a condition that selects the next value only if it is not bigger than 20% of the ...
0
votes
0
answers
16
views
N-Way ANOVA for Participation Rate Data
I am trying to conduct a test of statistical significance in a dataset with multiple categorical variables, each of which combine into different population sizes. Here is an example of what I mean:
...
0
votes
1
answer
25
views
How would I draw random samples from a 2 dimensional density plot?
I have (x,y) coordinate pairs that I've plotted using sns.kdeplot. I want to randomly sample coordinates based on the 2D probability density function. How would I do that?
Here's some dummy data:
...
0
votes
1
answer
35
views
how to conduct blackjack simulation with replacement
how would I Write code to simulate 5,000 repetitions of 2 cards being dealt to a player, whereby the cards are drawn with replacement. Using the relative freq of of a blackjack incidence In 5,000 ...
0
votes
0
answers
15
views
Loop within a column with non numerical data [duplicate]
I have a data frame with three columns. The first column involves the questions, the second column involves the answer types (passive, active, neither) and the third column involves the ID (e.g., 1,2,...
0
votes
0
answers
9
views
Is there any way to collect stats for Google Colab with Wakatime?
Do you know any ways to observe stats with Waka time while using Google Collab? You can also write about any other apps, that can help with this aim. The final goal is to add a widget in my Github ...
-1
votes
0
answers
9
views
Which is best model for regression if all independent variables are categorical and ordinal in nature?
I have dataset with 4000+ rows and 150+ features ,all of which are categorical.
Though I'm getting a very less RMSE with Random Forest Regressor, when I plot actual vs predicted scatterplot, the ...
0
votes
1
answer
26
views
Struggling with turning data into an array to delete columns
I get the error "builtins.TypeError: cannot perform reduce with flexible type"
and i use this code to convert the data into an array and delete specific columns
def boxplot_data(data, ...
0
votes
0
answers
8
views
diagnostic plots for R::fixest
Is there any way to get diagnostic plots for the package fixest? e.g. leverage plots, actual v predicted, qq plots, residual plots?
I notice that if I have plot(x) where x is a fixest object, it gives ...
0
votes
1
answer
26
views
Pooled stdev - why can't I replicate wikipedia? Numerical or understanding problem?
I'm trying to replicate example section from Wikipedia's article on pooled standard deviations. They say I should use following formula:
on the following table:
And get a result of:
But when I use ...
0
votes
1
answer
14
views
R: Update input-variable in a function
How do i update a input variable of a function
df1 = data.frame(State = c('Arizona AZ','Georgia GG', 'Newyork NY','Indiana IN','Florida FL'), Score=c(62,47,55,74,31), id=c(1,2,3,4,5))
df1
df2 = data....
0
votes
0
answers
7
views
How to group biological samples by colonization similarity using python?
folks.
I have several groups of biological samples with different biological groups that colonize specific áreas (ex: 1BB, 2MN) of a vessel.
For example:
I usually plot all those samples in a ...
0
votes
1
answer
24
views
how to get profit/loss of a full day when there are rows with same date but different time
Unnamed: 0 open high low close volume Date time Profit Loss proforloss
0 0 252.70 254.25 252.35 252.60 319790 2022-01-03 09:15:00 0.000000 0.039573 -0.039573
1 ...
0
votes
0
answers
20
views
Calculating mean of a dataframe takes way longer than the standard deviation
I have a very large pandas Dataframe for which I am trying to find the std and mean. The It takes only few seconds to calculate the std while finding the mean takes in the order of minutes. Am I ...
0
votes
3
answers
36
views
Density plot of the F-distribution (df1=1). Theoretical or simulated?
I am plotting the density of F(1,49) in R. It seems that the simulated plot does not match the theoretical plot when values approach the zero.
set.seed(123)
val <- rf(1000, df1=1, df2=49)
plot(...
1
vote
3
answers
36
views
Whats wrong with my function? Calculation of Percentage with matching IDs
So this is the function i am trying to build.
It should calculate the percentage of a col of one Df on another based on same IDs.
# With dummy data
df1 = data.frame(State = c('Arizona AZ','Georgia ...
0
votes
1
answer
32
views
ggplot within function does not fully work
I am trying to create Bland-Altman plots between 2 sets of percentages with a custom function that uses ggplot within it to generate the plot.
Perc1 <- sample(1:100, 100)
Perc2 <- sample(1:100, ...
0
votes
0
answers
25
views
Predict yearly harvest - Regression
ey guys I need your help. I want to predict rice production in India using a simple regression. For this I have a dataset with the yield and production data for the last 40 years. As explanatory ...