Issue I am trying to make a service that will calculate statistics for each month. I did smth like this: public Map<String, BigDecimal> getStatistic() { List<Order> orders = orderService.findAll(Sort.by(Sort.Direction.ASC, "creationDate")).toList(); SortedMap<String, BigDecimal> statisticsMap = new TreeMap<>(); MathContext mc = new

Continue reading# Tag: statistics

## [SOLVED] Trying to simulate Poisson samples using inverse CDF method but my R function produces wrong results

Issue I wrote some R code for simulating random samples from a Poisson distribution, based on the description of an algorithm (see attached image). But my code does not seem to work correctly, because the generated random samples are of

Continue reading## [SOLVED] Filtering dataset to only show the data within a range of values

Issue How do I remove data within a dataframe which is not included within my range? My dataframe which contains the information is called df and contains a start and end point: start end 65 1237 1262 2134 2178 4511

Continue reading## [SOLVED] Compute a confidence interval from sample data assuming unknown distribution

Issue I have sample data for which I would like to compute a confidence interval, assuming a distribution that is not normal and is unknown. Basically, it looks like the distribution is Pareto. But I don’t know for sure. The

Continue reading## [SOLVED] Advanced Describe Pandas

Issue Is there a more advanced function like the describe that the pandas has? Normally i will go on like : r = pd.DataFrame(np.random.randn(1000), columns = [‘A’]) r.describe() and i will get a nice summary.Like this one: A count 1000.000000

Continue reading## [SOLVED] Johansen cointegration test in python

Issue I can’t find any reference on funcionality to perform Johansen cointegration test in any Python module dealing with statistics and time series analysis (pandas and statsmodel). Does anybody know if there’s some code around that can perform such a

Continue reading## [SOLVED] ACF plot in ggplot2 from a mixed effects model

Issue I’m trying to perform an autocorrelation plot in ggplot2. library(nlme) fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1) plot(ACF(fm2,resType="normalized"),alpha=0.05) Result through the above function: ########################## IC ########################### ic_alpha= function(alpha, acf_res){ return(qnorm((1 + (1

Continue reading## [SOLVED] How to test the hypothesis for equality of variances through the Barlett test?

Issue Request from the user and enter the number of time subintervals (2 or more). Divide the elements of the TT vector into a given number of connected, approximately equal subintervals. Calculate variance estimates on each subinterval. Using the Bartlett

Continue reading## [SOLVED] Variable doesn't show up in R studio after using mutate function

Issue I am trying to create a new variable "season" from month variable by using the following script: alldata_n %>% mutate( season = case_when( month %in% 10:12 ~ "Fall", month %in% 1:3 ~ "Winter", month %in% 4:6 ~ "Spring", month

Continue reading## [SOLVED] Residual plots of a regression model in ggplot2

Issue I’m trying to transform two residual plots performed below into ggplot2. As a description, in order to perform these graphs, it is necessary to previously define some functions associated with the specifics of the class of the adopted model,

Continue reading