I'm trying to find outliers using the 1st and 3rd quartile. This is what I have currently:
$data = Data::select('created_at', 'value')
->get();
$median = collect($data)->median("value");
I'm trying to find outliers using the 1st and 3rd quartile. This is what I have currently:
$data = Data::select('created_at', 'value')
->get();
$median = collect($data)->median("value");
Copyright © 2021 Jogjafile Inc.
You can create a private function like this:
Then, you can call the
Quartile()method depends on which quartile you want, if you want the first quartile, then put0.25for the as$Quartile's parameter value, for the third quartile, its0.75.Source answer