Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Ron McLeod
• Paul Clapham
• Bear Bibeault
• Junilu Lacar
Sheriffs:
• Jeanne Boyarsky
• Tim Cooke
• Henry Wong
Saloon Keepers:
• Tim Moores
• Stephan van Hulst
• Tim Holloway
• salvin francis
• Frits Walraven
Bartenders:
• Scott Selikoff
• Piet Souris
• Carey Brown

# Using Arrays

Greenhorn
Posts: 3
Hey guys I have a quick question on my hw, I have found everything needed except the "unusual scores". this is the direction given:

Determine which of the grades, if any, are "unusual" in the sense that their corresponding z-score is < -2.0 or > +2.0. A z-score is computed as:

I know what the x bar and the s is, but I am unsure of what the first x is pertaining to. Can anyone give me a few tips?

Thanks

image004.gif

Ranch Hand
Posts: 87

Marshal
Posts: 70353
283
. . . and welcome to the Ranch

I would presume s means standard deviation, in which case you are assuming the marks are normally distributed, and you should really be given σ as its symbol

Bartender
Posts: 4568
9

Campbell Ritchie wrote:I would presume s means standard deviation, in which case you are assuming the marks are normally distributed, and you should really be given σ as its symbol

Actually, looking at the formulas used, I think he does mean s. The stdDev function is dividing by N - 1, which means it's the sample standard deviation, rather than the standard deviation. And s is the conventional notation for that.

Cam Barley
Greenhorn
Posts: 3

Matthew Brown wrote:

Campbell Ritchie wrote:I would presume s means standard deviation, in which case you are assuming the marks are normally distributed, and you should really be given σ as its symbol

Actually, looking at the formulas used, I think he does mean s. The stdDev function is dividing by N - 1, which means it's the sample standard deviation, rather than the standard deviation. And s is the conventional notation for that.

thanks for all the quick replies Yes it is the std dev for the sample grades. I was unsure how to write the array for the unusual scores, I didn't know if it should have a loop for the grades to see if any of them are unusual, anyone have a tip?

Thanks

Matthew Brown
Bartender
Posts: 4568
9

Cam Barley wrote:I didn't know if it should have a loop for the grades to see if any of them are unusual, anyone have a tip?

That's how I'd do it. Calculate the mean and ssd, assign them to variables, then look through the array checking the z-score for each one.

 Don't get me started about those stupid light bulbs.