Dave2e
  • Member for 5 years, 9 months
  • Last seen this week
  • Virginia
Why are the ends of the prediction interval wider in the regression?
7 votes

When performing a linear regression, there are 2 types of uncertainty in the prediction. First is the prediction of the overall mean of the estimate (ie the center of the fit). The second is the ...

View answer
What is the probability of 4 person in group of 18 can have same birth month?
7 votes

The correct way to solve the 2 coincident problem is to calculate the probability of 2 people not sharing the same birthday month. For this example the second person has a 11/12 chance of not sharing ...

View answer
Difference between Monty Hall and Russian roulette problems
Accepted answer
6 votes

In the Monty Hall problem there is prior knowledge (on the part of the judges) of which door the goats are behind. If the contestant on the first pick happens to pick the door with the goat. The ...

View answer
Confidence band for simple linear regression - why the curve?
5 votes

There is 2 uncertainties here. As you mentioned there is the uncertainty with the slope thus the spreading curve at ends, but there is also an uncertainty at the mean. Yes, the curve is thinnest at ...

View answer
Why is the intercept in multiple regression changing when including/excluding regressors?
5 votes

Your professor comments concerning the conditional mean is when x meets a particular condition. In this case the intercept is the conditional mean of y when x=0. If x never takes the value of 0, then ...

View answer
How to simulate Likert-scale data in R?
Accepted answer
5 votes

To perform the simulation, here is a one line solution using the sample function: sample(0:4, N, replace = TRUE, prob = c(0.1, 0.2, 0.4, 0.2, 0.1)) #where: # 0:4 is the sequence of values (0 to 4 ...

View answer
Why is the sum of standard deviation of random effects in lme4 output greater than the actual sd of the variable itself?
Accepted answer
5 votes

The total variablity is equal to the square root of the sum of the squares of the individual variabilities. So this this case: 56.32^2 = (35.75^2 + 44.26^2) Due to rounding error in the ...

View answer
wilcox.test gives different results in when using formula
4 votes

In the formula, case one, is comparing the 'mpg' variable subsetted with the 'am' variable. In this case a vector of 19 values versus a vector of 13 values. In the non-formula example, one is ...

View answer
What to do if the range of an input factor changes after running the experiment?
Accepted answer
3 votes

What should be done in this case? This depends on your current running conditions. Is x1 currently running close the old limit of 20? Does the experiment which has been done initially make still ...

View answer
Difficulty fitting polynomial model to data
Accepted answer
3 votes

You are fitting a linear vx but plotting it on a log scale. Try taking the log in your lm model fit and then plot. pm = lm(vy ~ poly(I(log(vx)), degree=5, raw=TRUE), data = dat)

View answer
How do I have a p-value of 1 in the left tail from a two-sample t-test?
2 votes

Let us define $\mu_1= 383$ and $\mu_2= 168$ with reasonable small standard deviations. The differences between the means are over 4 standard deviations apart. By eye one can judge, with a large ...

View answer
Determining when the first point in a simulation will exceed a certain value
2 votes

The chance of A being $>2\sigma$ from the mean is $2.28\%$. pnorm(12, 10, 1, lower.tail = FALSE) Thus the chance of A & B (2 independent events both occurring) is equal to $A*B$ or $0.052\%$ ...

View answer
Multiple Regression, R output how to interpret the intercept
Accepted answer
2 votes

Yes, R's output multiple regression can be tricky to understand at first. Think about this way when pop =1 (the first categorical value) you can drop all of the terms with pop2 and pop3 so you linear ...

View answer
Are regression coefficients same as effect size?
Accepted answer
2 votes

The effect estimate is the difference in the result from when your factor changes from the high value to the low value. In your problem statement above the effect estimate for factor A is the average ...

View answer
Predict based on time using a weibull
Accepted answer
1 votes

I think you are looking for something like this: df <- structure(list(day = 1:6, growth = c(0.036787944, 0.018348802, 0.0121861, 0.009104847, 0.007257658, 0.006027639)), ...

View answer
Sample size for a difference of means
1 votes

This a poorly worded question, but you have all of the information you need to solve this problem. Just for a quick estimate, a difference of 28 in the means with a standard deviation of 20 has a z ...

View answer
Interpreting logistic regression in R with huge OR: Strategies to interpret
1 votes

It looks like both A and K are binary factors so, I don't believe logistic regression is the best statistical test here. I would recommend Chisq or Fisher's Exact test. With that said, from your small ...

View answer
Test to determine whether coin is fair or not
1 votes

The formula to calculate the approximate confidence limits for a binomial test is: $z_{alpha/2}*\sqrt{p*q/n}$ In your case for a fair coin p = q = 0.5 and using $z_{alpha/2}=1.96$ for a 95% confidence ...

View answer
How do I do a t-test only on data that fulfills a certain criterion?
1 votes

The t.test is for comparing only 2 conditions A vs B. Your problem is A vs B vs C. So one option is to perform 2 separate t.test and compare Q1 to Q4 for both Food types. The other option is to ...

View answer
Does Wilcoxon Signed Rank (paired test) in R automatically analyse data by row?
1 votes

Yes, since a X and Y are provided and paired=TRUE option is used. From help: "If both x and y are given and paired is TRUE, a Wilcoxon signed rank test of the null that the distribution of of x -...

View answer
When to use t-test and Chi-squared test
Accepted answer
1 votes

When you have a 2 factor category independent variable and a continuous dependent variable then look at performing a t-test. In this case you have a categorical independent variable and count data ...

View answer
Help Identifying Experiment Design
1 votes

MichiganWater mention this is a split plot design, Temperature is the plot and the recipe is the subplot. Using R to design the experiment: library(agricolae) library(tidyr) Temp <- c("T1&...

View answer
How to plot quadratic model?
Accepted answer
1 votes

Without a sample of your data here is a simple example. The basic workflow is creating the dataset, fitting the data, making the prediction and then plotting: #create fake data x<- seq(0, 10, 0.2) ...

View answer
How to show that this stat statement is true
1 votes

Another potential way of solving this problem is with a Poisson Distribution. In this case $\lambda$ is 1/1000. So the probability of of observing 0 events with a single trial is: ppois(0, 1/1000) #...

View answer
Conditional probability distributions
1 votes

Each draw is an independent random event, the odds of picking a unique balls is dependent on the number of previous picks. First draw 8/8 or 100% of drawing a unique ball Second draw is 7 out of 8 ...

View answer
Testing changes in echocardiogram wave before and after treatment
1 votes

To answer your question and expand on my comment: Since you have a matched pairs of before and after, then testing the difference is a better test than comparing the raw values. Also since you ...

View answer
Why are there differences between the agglomerative methods of cluster analysis and the hierarchical cluster?
Accepted answer
1 votes

If you plot(res.hc) you can see the tree is highly unbalanced and thus when you specify a cut of two, one is making the cut at the first branching point. In this case the tree has a single branch on ...

View answer
Estimating population defects from a sample size
Accepted answer
1 votes

Sampling without replacement follows a hypergeometric distribution. Assuming you have a 5% defect rate. The chances of drawing a passing part on the first pick is equal to 228/240 or 95%, now on ...

View answer
Cochran's sample size formula p variable meaning and intuition
Accepted answer
1 votes

1) What is p and how can I understand it intuitively with an example? You answered your own question here. "p as a sample proportion or as estimated proportion of an attribute that is present in ...

View answer
Chi squared test to confirm game is fair and consistent with paytable
1 votes

Chi-square test is for count data, for example the number of time a dice is rolled a 6. What does the distribution looked like from the results of the 17000 games? If it looks approximately normal, ...

View answer