statistics

Smoothing Small Data Set With Second Order Quadratic Curve

I'm doing some specific signal analysis, and I am in need of a method that would smooth out a given bell-shaped distribution curve. A running average approach isn't producing the results I desire. I want to keep the min/max, and general shape of my fitted curve intact, but resolve the inconsistencies in sampling. In short: if given a set of data that models a simple quadratic curve, what statistical smoothing method would you recommend? If possible, please reference an implementation, library, or framework. Thanks SO! Edit: Some helpful data (A possible signal graph) The dark colored quadratic

2022-01-19 01:00:30    分类:问答    c++   c   statistics   signal-processing   quadratic

how to sample from an upside down bell curve

I can generate numbers with uniform distribution by using the code below: runif(1,min=10,max=20) How can I sample randomly generated numbers that fall more frequently closer to the minimum and maxium boundaries? (Aka an "upside down bell curve")

2022-01-18 08:00:34    分类:问答    r   statistics

How to random sample lognormal data in Python using the inverse CDF and specify target percentiles?

I'm trying to generate random samples from a lognormal distribution in Python, the application is for simulating network traffic. I'd like to generate samples such that: The modal sample result is 320 (~10^2.5) 80% of the samples lie within the range 100 to 1000 (10^2 to 10^3) My strategy is to use the inverse CDF (or Smirnov transform I believe): Use the PDF for a normal distribution centred around 2.5 to calculate the PDF for 10^x where x ~ N(2.5,sigma). Calculate the CDF for the above distribution. Generate random uniform data along the interval 0 to 1. Use the inverse CDF to transform the

2022-01-18 01:51:07    分类:问答    python   random   statistics   probability-density   cdf

Can one extend the functionality of PDF, CDF, FindDistributionParameters etc in Mathematica?

I've started doing more and more work with the new Mathematica statistics and data analysis features. I attended the "Statistics & Data Analysis with Mathematica" online seminar on Tuesday (great presentation, I highly recommend it) but I've run into some problems that I hope someone on this forum might have a few moments to consider. I've created a rather extensive notebook to streamline my data analysis, call it "AnalysisNotebook". It outputs an extensive series of charts and data including: histograms, PDF and CDF plots, Q-Q plots, plots to study tail fit, hypothesis test data, etc. This

2022-01-17 20:58:29    分类:问答    statistics   wolfram-mathematica   distribution

c++ 离散分布抽样，概率频繁变化(c++ discrete distribution sampling with frequently changing probabilities)

2022-01-16 19:01:07    分类:技术分享    c++   statistics   distribution   probability   sampling

Goodness of fit test for Weibull distribution in python

I have some data that I have to test to see if it comes from a Weibull distribution with unknown parameters. In R I could use https://cran.r-project.org/web/packages/KScorrect/index.html but I can't find anything in Python. Using scipy.stats I can fit parameters with: scipy.stats.weibull_min.fit(values) However in order to turn this into a test I think I need to perform some Monte-Carlo simulation (e.g. https://en.m.wikipedia.org/wiki/Lilliefors_test) I am not sure what to do exactly. How can I make such a test in Python?

2022-01-16 17:33:48    分类:问答    python   scipy   statistics   weibull   openturns

在 R 中拟合 von Mises 分布的混合(Fit a mixture of von Mises distributions in R)

2022-01-16 17:05:48    分类:技术分享    r   statistics

c++ discrete distribution sampling with frequently changing probabilities

Problem: I need to sample from a discrete distribution constructed of certain weights e.g. {w1,w2,w3,..}, and thus probability distribution {p1,p2,p3,...}, where pi=wi/(w1+w2+...). some of wi's change very frequently, but only a very low proportion of all wi's. But the distribution itself thus has to be renormalised every time it happens, and therefore I believe Alias method does not work efficiently because one would need to build the whole distribution from scratch every time. The method I am currently thinking is a binary tree (heap method), where all wi's are saved in the lowest level, and

2022-01-16 16:05:52    分类:问答    c++   statistics   distribution   probability   sampling

Fit a mixture of von Mises distributions in R

I have a set of angular data that I'd like to fit a mixture of two von Mises distributions to. As shown below, the data are clustered at about 0 and ±π, so having a periodic boundary is required for this case. I have tried using the movMF package to fit a distribution to these data but it seems that it is normalizing each row, and since this is a set of 1D data, the result is a vector of ±1. How are others fitting a mixture of distributions like this in R?

2022-01-16 13:38:21    分类:问答    r   statistics

Django & Postgres - 百分位数（中位数）和分组依据(Django & Postgres - percentile (median) and group by)

2022-01-16 09:07:43    分类:技术分享    python   django   postgresql   statistics   subquery