Skip to content
Need help with a simple Java programming question
Profile icon
mnp

I added a picture of it. I'm mostly unsure about how to count the data in each.
This file cannot be displayed: https://storage.googleapis.com/replit/images/1535413863436_ee6c82f331b76326cd66ae90e0d7aff4.pn

You are viewing a single comment. View All
Profile icon
theangryepicbanana

Can you show what you have so far?

Profile icon
mnp

@theangryepicbanana
I don't really have anything. I cant figure out how to start it. I'm confused about how to declare the numbers I want to use

Profile icon
theangryepicbanana

@mnp
I don't know how you do standard deviation in Java, but here's some pseudo-code:
(std = standard deviation)

int[] findOutlier(int[] data) { int[data.length] outliers; for(int i = 0; i < data.length; i++) { if(isOutsideAverage(data[i], findStd(data) * 3)) { outliers[i] = data[i]; } } return outliers; }

something like that I guess. I haven't used Java in a while, but that hopefully should give you a good idea of what to do.