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
2
votes
1 answer

Keras: how to figure out the Null hypothesis?

I am training a deep neural net using keras. One of the scores is called val_acc. I get like a 70% val_acc. How do I know if this is good or bad? The neural net is a binary classifier, so I am trying to predict a 1 or a 0. The data itself is…
user1367204
  • 4,549
  • 10
  • 49
  • 78
2
votes
1 answer

Should I instantiate Hypothesis strategies that are used by multiple tests?

The built-in hypothesis strategies are provided via functions (e.g. rather than an actual strategy, integers is a function that creates a strategy). That suggests to me that strategy objects have internal state. @given(integers()) def test_foo(n): …
Brendan
  • 1,995
  • 1
  • 20
  • 35
2
votes
2 answers

Multiple binomial tests in one code

I would like to perform the exact binomial test, with binom R package(binom.test function), to 4 different number of successes with 4 different probability values. I can do it singularly, but I would like to know if I can write a code to do the…
user6644063
2
votes
1 answer

Bootstrap-t Method for Comparing Trimmed Means in R

I am confused with different robust methods to compare independent means. I found good explanation in statistical textbooks. For example yuen() in case of equal sample sizes. My samples are rather unequal, thus I would like to try a bootstrap-t…
Mac
  • 183
  • 1
  • 13
2
votes
1 answer

Passing hypothesis in wald.test in R

Please forgive as i am new to this forum. The study requires to check the sum of coefficients=0. The test can be conducted using eviews like c(2)+c(3)+c(4)=0, where 2 is the coefficient of 2nd term and hence forth. The code for the same using R is …
2
votes
1 answer

Calculate type II error

How can I calculate the theoretical type II error in this particular case using R? a <- rnorm(500, 10, 5) b <- rnorm(500, 10, 5) t.test(a, b)
newa123
  • 99
  • 8
2
votes
3 answers

T-test for multiple classes (>2)

I have read the following sentence: Functional MRI data are high dimensional compared to the number of samples (usually 50000 voxels for 1000 samples). In this setting, machine learning algorithm can perform poorly. However, a simple …
machinery
  • 5,972
  • 12
  • 67
  • 118
2
votes
1 answer

Python performing t-test only on pairs

hi a while back i got help to make this function, but im royally stuck now. from scipy.stats import ttest_ind def input_file_to_dict(f): return dict((key, int(value)) for value, key in map(lambda line:line.split(), f)) …
RHK-S8
  • 317
  • 1
  • 3
  • 11
1
vote
3 answers

fast perl t-test function

I'm using perl+R to analyze a large dataset of samples. For each two samples, I calculate the t-test p-value. Currently, I'm using the statistics::R module to export values from perl to R, and then use the t.test function. However, this process is…
HEnav
  • 133
  • 1
  • 3
  • 7
1
vote
0 answers

Test the equality of two generalized Lorenz curves

I am trying to test two generalized Lorenz curves using the rtippackage. Please see the code below. library(rtip) X = data.frame(ipuc = rchisq(20, 5)) Y = data.frame(ipuc = rchisq(20, 5)) testGL(X, Y, ipuc = "ipuc", hhcsw = NULL, hhsize =…
score324
  • 687
  • 10
  • 18
1
vote
0 answers

R : "weights = varIdent" helps to deal with unbalanced classes in a linear model?

I want to fit a linear mixed model (because I have repeated measures over time). LM.fit <- lme(VR ~ Group * Time + Age + sexe + study, random = ~1|subject, method = "REML", na.action = na.omit, …
learners
  • 195
  • 1
  • 12
1
vote
1 answer

Error in dunntest: Error in if (tmp$Eclass != "factor") { : the condition has length > 1

I get an error when I try to run the Dunntest on my data and I can't figure out what's causing it. I have 4 groups with ordinal discrete data, the Kruskal-Wallis test suggest a significant difference between groups but I can't run the dunntest…
ghs101
  • 103
  • 6
1
vote
1 answer

So I'm studying for a midterm and could't figure out this question from the question bank. Any ideas?

My professor's explanation also wasn't very helpful and the question has been bothering me for a couple of days now. "To show that the mean of burger sold by a particular shop is greater than 2.4 oz, a hypothesis test is carried out under 5%…
1
vote
1 answer

Disable NonInteractiveExampleWarning in python hypothesis

I want to use hypothesis awesome features to create some sample data for my application. I use it roughly like this from hypothesis import strategies as st ints = st.integers() #simplified example ints.example() I get this…
Hatatister
  • 962
  • 6
  • 11
1
vote
0 answers

How can I perform a right tailed hypothesis test without t.test?

From what I understand, this method of doing a t-test will do a regular, left-tailed t-test. t <- (NFL.Broncos.LowSpread$PerformanceScoreOff - mean(NFL.Broncos$PerformanceScoreOff)) /…
Antonio
  • 417
  • 2
  • 8