# Fitting distributions in STATISTICA

#### kobylkinks

##### New Member
Hi

I have a question about Fitting distribution technique in STATISTICA. The problem is that it requires having original numerical data for the variable whose distribution I need to fit to
whereas I just have var bins and their frequencies instead.
Of course I can get bin centers and multiple them with respect to bin frequencies but it looks odd I think. Is there any idea on how to make it work with that type of data ?

#### kobylkinks

##### New Member
I just get it done using weights but still don't understand how to make it work with
> bin. I mean I have bins 1<=x<2 .... x>15.

#### JenB

##### New Member
There are a couple ways to do this: the simple way or the complicated way.

The simple way is basically what you are doing already, that is estimating points (e.g., using bin mean) and then multiplying out the cases. There are two issues with this simple way. The first is that there will be a problem with variance estimation; the second is what to do with bins on the end.

The complicated way is to write a STATISTICA Visual Basic macro to do a type of bootstrapping that samples from the bins and then looks at the distribution. To address the end bin, you could apply a function that gets some outliers when you sample.

#### kobylkinks

##### New Member
Hi Jen.

That's very interesting. I mean using bootstrapping. Can you elaborate on that a little ?

#### JenB

##### New Member
There really isn’t a quick answer to this, but an overview of bootstrapping can be found here:
http://en.wikipedia.org/wiki/Bootstrapping_%28statistics%29

In your case, I'd sample from a random spot in a selected bin (where the probability of selecting a bin would be weighted by the observed frequency) instead of just an observation. After some bootstrap samples are made, a distribution could be estimated.