Using distribution of data instead of data in `EstimatedDistribution`

Because of huge amount of data, the data saved in their frequency. for example {1,1,1,1,1,1,2,2,1,2,2,1,1,2,1,2,1,3,24} saved as {{1,11},{2,6},{3,1},{24,1}} how can use this type of saved data in below command?

EstimatedDistribution[data,PowerDistribution[a,b],ParameterEstimator->”MaximumLikelihood”]

or

EstimatedDistribution[data,ZipfDistribution[a,b],ParameterEstimator->”MaximumLikelihood”]

=================

=================

1 Answer
1

=================

You can use WeightedData[] for the purpose:

FindDistributionParameters[WeightedData @@ Transpose[{{1, 11}, {2, 6}, {3, 1}, {24, 1}}],
PowerDistribution[a, b],
ParameterEstimator -> “MaximumLikelihood”]
{a -> 0.041666666666666664, b -> 0.3657540721946402}

  

 

P.S. Here is how to do the reduction automatically: WeightedData @@ Transpose[Tally[{1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 3, 24}]].
– J. M.♦
Jun 14 at 0:28