Group Abstract Group Abstract

Message Boards Message Boards

Implementing a function to determine the standard error?

Posted 5 years ago
POSTED BY: Ion Ganea
7 Replies
Posted 5 years ago

You have a few errors in the code.

  • The definition of coeficientOfVariation[val_] is missing an additional f.
  • Sqrt[val["PathLength"]] should be Sqrt[Length[val]].
  • Mean[val["PathLength"]] should be Mean[val].
POSTED BY: Jim Baldwin
Posted 5 years ago

Thank you for your help. Unfortunately, I need just a bit more. This section's been giving me a few errors. I made a few changes and it seemed to go well but after saving and restarting, they're back.

standardError[val_] := StandardDeviation[val]/Sqrt[Length[val]]
LRad = {7.43, 10.1, 6.07, 9.65};
stdErr = standardError[LRad];

LRad = Apply[Around, Transpose[{LRad, stdErr}], 1];
BarChart[LRad, ChartElementFunction -> "GlassRectangle", 
 ChartStyle -> "Pastel", ImageSize -> 500,
  ChartLabels -> {"1", "2", "3", "4" }, LabelStyle -> {16, Bold},
 AxesLabel -> {"", "cm"}, BarSpacing -> 0.3, 
 LabelingFunction -> Bottom]

The errors: errors

POSTED BY: Ion Ganea
Posted 5 years ago

It is not so obvious what your data are:)

Lets say you have computed your mean data and errors to be:

mean = {7.43, 8.83, 6.06, 13.8};
errors = {4, 3, 2, 1};

then you wrap Around to your data:

data = Apply[Around, Transpose[{mean, errors}], 1];

and BarChart it:

BarChart[data, ChartElementFunction -> "GlassRectangle", 
 ChartStyle -> "Pastel"]

which gives:

enter image description here

POSTED BY: Oliver Seipel
Posted 5 years ago
POSTED BY: Ion Ganea
Posted 5 years ago
POSTED BY: Oliver Seipel
Posted 5 years ago

The functions standardError and coefficientOfVariation were evaluated.

POSTED BY: Ion Ganea
Posted 5 years ago

Out[28] and Out[29] have not evaluated standardError and coefficientOfVariation which means those functions have not been defined. Did you evaluate the cells that contain the definition?

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard