# Search results

1. ### Why is there n-1 degrees of freedom and not n-2 (student distribution)

Hi Dason and Rafaelle. My common sense says n-2 also I understand it is not correct as all know it is n-1... if you have 5 values: x1,x2,x3,x4,x5 if you know the estimation of mean - average(x) and estimation of variance - sample var(x) and you know x1 x2 and x3 you can calculate the x4 and x5...
2. ### Why is there n-1 degrees of freedom and not n-2 (student distribution)

Hi Rafaelle , I will try to say in other words what Dason said. The refection of the DF is Not for any parameter you estimate BUT because you estimate the Variance based on the estimation of the Mean, so there is a connection between the mean and the variance and here you loose the degree of...
3. ### Sample size when adding two means

Hi MH, I will try to answer the question only. you have a random variable X=X1+X2 you know the theoretical parameters of X1 and X2, now you can calculate the theoretical parameters of X. Now you have a new question. You know the theoretical parameters of X, you take a sample and you want to...
4. ### Solar energy prediction

I guess so... , but let me know if you really got a better result? I guess you should recheck the window when using lags, may be with lags the optimum won't be 30 days?.
5. ### Solar energy prediction

Hi Omar, Do you mean you have data of 365 days but you try to predict each day based on the previous 30 days, and then compare the prediction to the actual result? Did you check and find that data based on 30 days produce a better prediction that longer period? 60 days 360 day? Using only 30...
6. ### Solar energy prediction

Hi Omar, QQ plot is a graphical check for the residual normality assumption. There are several methods for the normality test, you should combine a statistic test method with a graphical method. For the "independence of errors" assumption, I assume it is better to use the residuals plot. You...
7. ### Solar energy prediction

Hi Omar, One of the regression assumptions is Independence of errors. Since there is probably a correlation between the Y of the last 30 days, you probably should check this assumption.
8. ### Solar energy prediction

Okay ... How exactly did you calculate the Predicated Y based on the 30 days historical data? Did you use regression over the last 30 days?
9. ### Solar energy prediction

Hi Omar, Generally, you should think about what variables to insert into the model, don't just insert into the model every possible variable. You should use some theoretical knowledge when choosing the predictors. Multicollinearity happened when some of the predictors are highly correlated...
10. ### Which stats test should I use?

Hi, You use a "Proportion test" when the proportion is calculated statistics based on several sample points and each sample outcome is one of 2 options. In your case, every single point is a proportion, so I assume you should compare the means of the sample points. PS I assume your data is...
11. ### Regression analysis sample size

Ps even if you run a lot of single tests, randomly some may become significant. That why you need to take a smaller significant level => lower power => you need a bigger sample size.
12. ### Regression analysis sample size

Is your goal only to understand what IV (xi) correlate with your DV (Yi)? Or do you want to know to predict Y?

Hi, You should look at the confident interval for the specific coefficient and see if the parameter fits in the interval. For example (for alpha=0.05) in the following link you should look at the "lower t0.025" ana "upper t0.975" for the specific parameter...
14. ### Test priori power - Welch T test

Yes of course In the morning every thing seems clear
15. ### Test priori power - Welch T test

Thanks Greta. I will try the RStudio I couldn't understand why is the sum of the p values binomially distributed. But may be it is the late hour in Melbourne. Yes the simulation is great :)
16. ### Test priori power - Welch T test

Okay, I checked with the nice person from R that wrote the function and it appears that he missed squared (for SD), so the manual calculation is correct. I can close this long thread Thanks Dason and Greta for your help This is the best statistics forum.
17. ### What test to report?

The results the same the process is different
18. ### Test priori power - Welch T test

Thanks Greta :) I'm new with R ...I assume you mean I should run the code in "R Editor" instead of the console? Definitely, 10000 is sufficient, I just try to see if getting exactly the same as my "manual" calculation, I don't care the computer will work hard 2 min ...:) I can see the...
19. ### Test priori power - Welch T test

Thanks Dason :) Good advice, this will reduce the possibility to make the same mistake also in the simulation ... Okay, at last, I found the \$p.value ... Is this okay now? > n1 <- 30; n2 <- 90 # sample size > sigma1 <- 10; sigma2 <- 20 # true SD > delta <- 5 # change > mu1 <- 100 #...
20. ### Regression analysis sample size

I assume for better prediction, you need to use multiple regression. What is the point of running many single regressions? What do you want to achieve?