Questions tagged [hypothesis-test]

Functions used to choose between competing hypotheses about one or more probability distributions. For statistical questions, please use stats.stackexchange.com.

Common hypothesis tests include the one-sample and paired t-test for means, the z-test, which approximates the t-test for large samples, F-test for differences in variance, and Chi-square test for independence, and Fisher's exact test for differences in proportion.

Please note that this tag is totally different from , which refers to software testing.

349 questions
0
votes
0 answers

Build multiple linear regression model in R?

I am trying to construct a multiple linear regression model that i am going to use for future prediction. In My code, i constructed the model using DF data where Y is my response variable while X1 and X2 independent variables. After fitting the…
Hydro
  • 1,057
  • 12
  • 25
0
votes
0 answers

Serial Mediation Within-Subjects in R

I am doing an experimental pysch research project and have a designed a study that requires serial mediation for a within-subjects design. I cannot find literature or packages that explains how to do run serial mediation for a within-subjects design…
richiepop2
  • 348
  • 1
  • 12
0
votes
1 answer

appropriate test for significance of difference

I need help conducting a hypothesis test to compare the coefficients for two of my explanatory variables in Stata. My null and alternative are: null: β1=β2 vs alt: β1>β2. So far I have used the command test to compare the two estimates. However, I…
hardy
  • 3
  • 1
0
votes
2 answers

Column vector in R and Python

Is it possible to create a column vector of length 500, such that first 150 rows are 1's and remaining 350 are 0's? Thank You!
RewaaK
  • 1
  • 1
0
votes
1 answer

How to do Tukey style proportion test for mutlinomial samples?

I have a 4 by 4 tables. Rows corresponds to people group and columns are their decisions types. The ij of the table is the number of people type i who have decision type j. decision 1 decision 2 decision 3 decision 4 people…
shayan
  • 11
  • 1
0
votes
1 answer

Best statistical test for a 3 x 3 confusion matrix

I have a 3 by 3 confusion matrix: +---------+------+--------+-----+ | | Good | Medium | Bad | +---------+------+--------+-----+ | Class 1 | 314 | 176 | 95 | +---------+------+--------+-----+ | Class 2 | 184 | 275 | 126…
Astarno
  • 193
  • 1
  • 9
0
votes
1 answer

Hypothesis testing in python not equal sizes

I have two samples(n1= 25, n2= 35) with N(mu = 70, sd =10) and I am trying to test H0:mu1-mu2=0 for variances unknown. This is the code I am working on it but I can not get the result because of inequal lengths. rvs1 =…
0
votes
2 answers

t-test for each row between two groups in R

I have two groups: high and low for weight. In addition I have gene expression values for all genes within each group with three varieties: gene Variety_1 Variety_2 Variety_3 Variety_4 Variety_5 Variety_6 Weight 75.01776435 61.33770069…
Jessica
  • 391
  • 1
  • 3
  • 16
0
votes
1 answer

Assumptions of the Chi-square test of independence

I want to use the Chi-square test of independence to test the following two variables: Student knowledge v.s. course attendance The null hypothesis is: student knowledge and course attendance (X and Y) are independent Members in each student…
0
votes
0 answers

High p-value but confidence interval that excludes 0?

In an A/B test, I'm calculating the proportion of Group A that have done something and comparing to the proportion of Group B that have done something to see if there is a meaningful difference. I run a t-test and find that the difference of -30%…
0
votes
0 answers

How can I get the pval working with percentages considering a table with NA values and data essentially constant (100% or 0%?

I am trying to get the pval from a bigdata table (700 observations and 6 variables). I can't calculate the p values due to repeated values of some percetanges (100% or 0%) The table more or less represent my doubt. What can I do to get my p values…
0
votes
0 answers

Which mathematical test should I use?

I have a dataset showing the yearly stock returns for two investment styles (growth and value investing) as well as a column showing the difference between the returns for each year. I have attached a picture below. I want to do a test to see if…
0
votes
1 answer

Finding ANOVA table and 95% CI in R

I'm trying to run the ANOVA on the bone marrow transplant study at Ohio State University. Here is the data using the code from( Cox proportional hazard model ). time_Allo_NHL<- c(28,32,49,84,357,933,1078,1183,1560,2114,2144) censor_Allo_NHL<-…
Dana
  • 75
  • 5
0
votes
1 answer

system is computationally singular error from linearHypothesis but the matrix has maximal rank

I'm performing a Mincer Zarnowitz to test the goodness of fit of a time series regression. The test (https://eranraviv.com/volatility-forecast-evaluation-in-r/) boils down to, first, running a regression of the observations on the fitted values, and…
Andrew
  • 678
  • 2
  • 9
  • 19
0
votes
1 answer

How to find the variance of a subset of the data in r?

I’m trying to find the variance of a subset of the whole data (dat) “pollutionData.csv”. I want the variance of the PM2.5 levels when rain = 0. var(PM2.5, data=subset(dat, RAIN == 0)) The code above isn’t working. aggregate(dat[, 6],…
Kai Whelan
  • 13
  • 1