Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
[Thumbnail for image004.gif]
 
Ranch Hand
Posts: 87
Opera Java
 
Marshal
Posts: 70353
283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
reply
    Bookmark Topic Watch Topic
  • New Topic