0
$\begingroup$

I am looking at the transmembrane voltage of a neuron model and would like to investigate this in more detail. The applied current is divided into a deterministic and a noisy component - if I set the deterministic = 0, only the "random" current fluctuations remain - see the attached picture.

picture 1

For example, we get this picture for 400 points in time )- attached you can find the list of voltages at the very end.)

If I determine the standard deviation, for example, I get 0.84mV (does this correspond to the RMS amplitude?). I would like to find out everything electrically and physically important about this voltage curve - what are the usual measurements used for this or what should I determine best?

[array([[-65.        ],
       [-64.9116449 ],
       [-65.02155128],
       [-65.00563994],
       [-65.03027769],
       [-65.47597692],
       [-65.46066436],
       [-65.43013921],
       [-65.14072059],
       [-64.89238965],
       [-64.42263341],
       [-64.49814765],
       [-64.83053303],
       [-65.06833876],
       [-65.13005927],
       [-65.24268658],
       [-65.40372795],
       [-65.9073483 ],
       [-65.8634158 ],
       [-66.08381536],
       [-66.31828201],
       [-66.47939166],
       [-66.59153708],
       [-66.37984791],
       [-66.26184325],
       [-66.63331362],
       [-66.24017059],
       [-66.22856062],
       [-66.56514893],
       [-66.6932582 ],
       [-66.51314947],
       [-66.35254385],
       [-66.3888366 ],
       [-66.55021895],
       [-66.20630214],
       [-66.14263112],
       [-65.89336843],
       [-66.05206653],
       [-65.89557447],
       [-65.88382853],
       [-65.50272908],
       [-65.83292589],
       [-65.93049636],
       [-66.00429494],
       [-65.98781127],
       [-65.91709233],
       [-65.82498149],
       [-66.15132889],
       [-65.69367323],
       [-65.8026372 ],
       [-65.939248  ],
       [-66.39565188],
       [-66.25566865],
       [-66.20536402],
       [-66.31987558],
       [-66.50904764],
       [-66.8188657 ],
       [-66.76121269],
       [-66.88980061],
       [-66.92302881],
       [-66.93007433],
       [-66.97958151],
       [-66.7299823 ],
       [-66.88289237],
       [-66.95803802],
       [-66.80686061],
       [-66.72387399],
       [-66.73225716],
       [-66.8151512 ],
       [-66.54052148],
       [-66.58094888],
       [-66.34508829],
       [-66.5654704 ],
       [-66.34032569],
       [-66.11692279],
       [-66.1406706 ],
       [-65.96485114],
       [-65.74592388],
       [-65.49392661],
       [-65.52311634],
       [-65.52852149],
       [-65.49684951],
       [-65.36853921],
       [-65.94810721],
       [-66.04813919],
       [-66.32370728],
       [-66.30740507],
       [-66.70052292],
       [-66.67516132],
       [-66.71396559],
       [-67.12342661],
       [-66.9753068 ],
       [-66.81556695],
       [-66.38124291],
       [-65.98474604],
       [-66.31526314],
       [-66.27654592],
       [-66.00733778],
       [-65.98991812],
       [-65.72625924],
       [-65.53896208],
       [-65.47763008],
       [-65.74395875],
       [-66.0621611 ],
       [-66.23248744],
       [-65.86300767],
       [-65.62601173],
       [-65.828566  ],
       [-65.5751218 ],
       [-65.5125111 ],
       [-65.2604186 ],
       [-65.11723251],
       [-64.94978953],
       [-64.82898047],
       [-64.53854598],
       [-64.50655361],
       [-64.68994843],
       [-64.65194201],
       [-64.58117841],
       [-64.36661547],
       [-64.27357153],
       [-64.46436564],
       [-64.65752521],
       [-64.91002284],
       [-64.78367709],
       [-64.24715826],
       [-63.85077967],
       [-63.95371632],
       [-63.98527022],
       [-64.02602195],
       [-64.05371826],
       [-63.8775681 ],
       [-64.01632221],
       [-64.00789355],
       [-64.32144846],
       [-64.29146618],
       [-64.28607979],
       [-64.31494284],
       [-64.56040531],
       [-64.55741326],
       [-64.40628332],
       [-64.46500402],
       [-64.16670596],
       [-64.24256675],
       [-63.88431192],
       [-64.01403183],
       [-63.85480363],
       [-63.84494533],
       [-64.0602149 ],
       [-64.06821003],
       [-64.49816597],
       [-64.5853951 ],
       [-64.72679413],
       [-64.56017691],
       [-64.84142459],
       [-64.60585822],
       [-64.4391544 ],
       [-64.625765  ],
       [-64.6293296 ],
       [-64.37677485],
       [-64.51855044],
       [-64.81888746],
       [-64.56917388],
       [-64.60576688],
       [-64.64711979],
       [-64.43791075],
       [-64.21227717],
       [-64.20525583],
       [-64.30585741],
       [-64.52804344],
       [-64.78698552],
       [-64.75433751],
       [-65.05562781],
       [-64.85987461],
       [-64.72087927],
       [-65.04099622],
       [-65.18662804],
       [-65.42385496],
       [-65.35405589],
       [-65.07630188],
       [-65.095045  ],
       [-65.28044548],
       [-65.43321718],
       [-65.53716249],
       [-65.45077545],
       [-65.5889548 ],
       [-65.9085    ],
       [-66.30312315],
       [-66.57827691],
       [-66.62446347],
       [-66.79569898],
       [-66.60583161],
       [-66.7248032 ],
       [-66.60953382],
       [-67.09057808],
       [-67.39484097],
       [-67.92706152],
       [-68.01012933],
       [-67.968443  ],
       [-68.19768488],
       [-68.09402849],
       [-68.33193661],
       [-68.5386953 ],
       [-68.23459759],
       [-68.20007979],
       [-68.12080982],
       [-68.18216452],
       [-68.09507646],
       [-68.27904916],
       [-68.28306857],
       [-68.23652695],
       [-68.28163687],
       [-68.32576597],
       [-68.39483743],
       [-68.16543391],
       [-68.1567964 ],
       [-68.11664628],
       [-67.94893208],
       [-68.39759535],
       [-68.04557715],
       [-68.20731077],
       [-68.7689684 ],
       [-68.46483345],
       [-68.8236987 ],
       [-68.77343396],
       [-68.83715794],
       [-68.19672187],
       [-67.96487167],
       [-67.89830738],
       [-67.83385384],
       [-67.56008165],
       [-67.58697641],
       [-67.78550394],
       [-68.19652345],
       [-68.25976393],
       [-68.62221462],
       [-68.60571986],
       [-68.58282592],
       [-68.57494235],
       [-68.6506523 ],
       [-68.43707232],
       [-68.24841744],
       [-68.38053283],
       [-68.45647336],
       [-68.48296063],
       [-68.31041501],
       [-68.0327774 ],
       [-67.71977336],
       [-67.38362457],
       [-67.41253992],
       [-67.33974845],
       [-67.5380442 ],
       [-67.64843765],
       [-67.60248179],
       [-67.46223844],
       [-67.53874959],
       [-67.64591059],
       [-67.6727817 ],
       [-67.86771676],
       [-67.57467136],
       [-67.2923519 ],
       [-67.37941914],
       [-67.3027707 ],
       [-67.18807996],
       [-67.02456116],
       [-66.94265383],
       [-66.91678135],
       [-66.5410909 ],
       [-66.4297625 ],
       [-66.6447592 ],
       [-66.77191601],
       [-66.64195378],
       [-66.32288708],
       [-66.48472613],
       [-66.39361777],
       [-66.5039367 ],
       [-66.24770631],
       [-66.31496498],
       [-66.17026318],
       [-66.10246028],
       [-66.27255014],
       [-66.08906876],
       [-66.34702597],
       [-66.3228165 ],
       [-66.18077282],
       [-65.79579615],
       [-65.58443569],
       [-65.25962053],
       [-65.43894121],
       [-65.83875143],
       [-66.21348773],
       [-66.20204187],
       [-66.39540703],
       [-66.28090044],
       [-66.22844412],
       [-66.14703998],
       [-65.88501482],
       [-65.84919857],
       [-65.79068538],
       [-65.79557644],
       [-65.80606167],
       [-66.06174934],
       [-66.18953513],
       [-66.51754723],
       [-66.30388956],
       [-66.30441291],
       [-66.3383444 ],
       [-65.92695351],
       [-65.82431769],
       [-65.6095415 ],
       [-65.65207033],
       [-65.39324389],
       [-65.71755669],
       [-65.83877997],
       [-66.11000408],
       [-66.14873108],
       [-66.21051931],
       [-66.19684684],
       [-66.03987148],
       [-66.30560495],
       [-66.31796601],
       [-65.95917833],
       [-65.87009934],
       [-65.95719358],
       [-65.70710902],
       [-65.70298316],
       [-65.95487516],
       [-65.66892262],
       [-65.86611181],
       [-65.71004839],
       [-66.07257052],
       [-66.28499203],
       [-66.26712388],
       [-66.37116898],
       [-66.19950702],
       [-66.1896879 ],
       [-66.16909264],
       [-65.90862864],
       [-66.4545256 ],
       [-66.22465699],
       [-65.86369608],
       [-66.00895411],
       [-66.09652561],
       [-66.39537195],
       [-66.22628218],
       [-66.31691999],
       [-66.3629723 ],
       [-66.17314238],
       [-66.13430056],
       [-66.34853608],
       [-66.37618727],
       [-66.19437825],
       [-65.71616295],
       [-65.81123331],
       [-65.36785052],
       [-65.43441201],
       [-65.46735593],
       [-65.35436215],
       [-65.04592104],
       [-65.06798081],
       [-65.25086968],
       [-65.32472781],
       [-65.09236619],
       [-65.40994905],
       [-65.0512835 ],
       [-65.11552797],
       [-65.06852275],
       [-64.78798952],
       [-64.64762077],
       [-64.91013582],
       [-64.79496271],
       [-64.99438496],
       [-64.98363238],
       [-64.89781277],
       [-64.65318479],
       [-64.63077217],
       [-64.55415941],
       [-64.79730491],
       [-64.84331903],
       [-65.04062032],
       [-64.95886118],
       [-64.66174712],
       [-64.98591752],
       [-65.16656874],
       [-65.17486859],
       [-65.45323362],
       [-65.05291336],
       [-65.15944493],
       [-65.23044017],
       [-65.39831794],
       [-65.68815689],
       [-65.86168398],
       [-65.5318999 ],
       [-65.64928939],
       [-65.60999761],
       [-65.65747973],
       [-65.40202274],
       [-65.53569141],
       [-65.32052998],
       [-65.24038648],
       [-65.09490175]])]
$\endgroup$
1
$\begingroup$

The standard deviation of your voltage samples will only be equal to the RMS of your samples if the average of your samples is zero. And that is not your situation here.

$\endgroup$
2
  • $\begingroup$ but when I calculate the RMS value, then I get something very big like 64.3mV.... but this is not a measure for the fluctuations.. $\endgroup$ Jan 3 at 13:43
  • $\begingroup$ but the "real RMS value" should be somewhere in the range of 1-2mV $\endgroup$ Jan 3 at 14:49
0
$\begingroup$

The standard deviation you got can't be right. The (unbiased) sample variance is given by

$$s_x^2=\frac{1}{N-1}\sum_{n=1}^N\big(x[n]-m_x\big)^2\tag{1}$$

where $m_x$ is the sample mean:

$$m_x=\frac{1}{N}\sum_{n=1}^Nx[n]\tag{2}$$

The standard deviation equals $s_x$, i.e., the square root of the sample variance. Note that the standard deviation does not equal the RMS value of the data. The standard deviation is a measure for the deviation of the data from its mean, whereas the RMS value is related to the power of the data. However, note that the standard deviation is sometimes called "root mean square (RMS) deviation".

Nobody can tell you which other measures you should compute because this completely depends on what you want to learn from the data.

$\endgroup$
8
  • $\begingroup$ Thank you! but how can I calculate the RMS of these data? and I don't know why the standard deviation should be wrong? I just calculated it via the package numpy in python $\endgroup$ Jan 3 at 18:13
  • $\begingroup$ @Voeslauer123: Did you look up the formula for the RMS? Just apply it. There should be a working function in numpy to compute the standard deviation. Otherwise just use the formula in my answer. $\endgroup$
    – Matt L.
    Jan 3 at 18:15
  • $\begingroup$ yes and this is the result - standard deviation is 0.84 $\endgroup$ Jan 3 at 18:23
  • $\begingroup$ @Voeslauer123: That's clearly wrong, nothing more to say about it ... Just compute it yourself, it's not rocket science! $\endgroup$
    – Matt L.
    Jan 3 at 18:24
  • $\begingroup$ regarding your sentence "what you want to learn from your data" -- I want to quantify the amplitude of the fluctuations $\endgroup$ Jan 3 at 19:12
0
$\begingroup$

In electronics terms, you have an AC signal on a DC offset.

RMS (root of the mean squared) includes the AC and the DC component. This is why you are getting a value of 64mV. You sum the squares of all the values, take the mean, then the square root.

You seem to want the RMS of the AC part only.

To get that, you take the average of all the data points, then subtract that number from every data point.

For the RMS including the DC offset, I get 66 millivolts.

For the RMS of the AC alone, I get 1.19 millivolts.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.