Writing median rather than mean The Next CEO of Stack OverflowUnweighted Mean of PercentagesDesign an algorithm - Median, computer scienceRuntime of recursive algorithm - Master's TheoremHow to find median from a probability distribution?Average of sum and Sum of average of 2 random non zero distributions of numbersMediant and arithmetic mean of several fractionsIs there a way to generally transform a weighted arithmetic mean to a weighted geometric mean?Which average would make the most sense (mean, mode, median)?Question about an inequality about geometric meanCalculate weighted mean based on simple mean

Inexact numbers as keys in Association?

How many extra stops do monopods offer for tele photographs?

IC has pull-down resistors on SMBus lines?

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

Can I calculate next year's exemptions based on this year's refund/amount owed?

How to set page number in right side in chapter title page?

My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?

Is there a reasonable and studied concept of reduction between regular languages?

Is it okay to majorly distort historical facts while writing a fiction story?

Strange use of "whether ... than ..." in official text

Why is information "lost" when it got into a black hole?

(How) Could a medieval fantasy world survive a magic-induced "nuclear winter"?

Help/tips for a first time writer?

In the "Harry Potter and the Order of the Phoenix" videogame, what potion is used to sabotage Umbridge's speakers?

Audio Conversion With ADS1243

Sulfuric acid symmetry point group

What is the difference between Statistical Mechanics and Quantum Mechanics

How did Beeri the Hittite come up with naming his daughter Yehudit?

Calculate the Mean mean of two numbers

Does destroying a Lich's phylactery destroy the soul within it?

Easy to read palindrome checker

Reference request: Grassmannian and Plucker coordinates in type B, C, D

When "be it" is at the beginning of a sentence, what kind of structure do you call it?

Why don't programming languages automatically manage the synchronous/asynchronous problem?



Writing median rather than mean



The Next CEO of Stack OverflowUnweighted Mean of PercentagesDesign an algorithm - Median, computer scienceRuntime of recursive algorithm - Master's TheoremHow to find median from a probability distribution?Average of sum and Sum of average of 2 random non zero distributions of numbersMediant and arithmetic mean of several fractionsIs there a way to generally transform a weighted arithmetic mean to a weighted geometric mean?Which average would make the most sense (mean, mode, median)?Question about an inequality about geometric meanCalculate weighted mean based on simple mean










0












$begingroup$


I have some code to calculate the mean bias between two arrays.



$$mean_bias=fracsum_i=1^na_i-b_in$$



and was hoping to represent the median instead:



$$median_bias=Median(a-b)$$



Does something like this hold true? But it's not sorted so index will not be the middle:



$$median_bias=sum_i=n/2^n/2+1a_i-b_i$$



How can I represent this?



Thanks










share|cite|improve this question









New contributor




Ocean Scientist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    This question does not concern mathematics and would be better suited for TeX - LaTeX Stackexchange.
    $endgroup$
    – Brian
    Mar 28 at 1:08











  • $begingroup$
    I tried there first and was suggested to ask here instead.
    $endgroup$
    – Ocean Scientist
    Mar 28 at 1:14






  • 1




    $begingroup$
    I don't understand the question
    $endgroup$
    – Jorge Fernández Hidalgo
    Mar 28 at 1:14










  • $begingroup$
    You can write median bias = median a - median b
    $endgroup$
    – Jorge Fernández Hidalgo
    Mar 28 at 1:15






  • 1




    $begingroup$
    The formula only, I can convert it into Tex myself.
    $endgroup$
    – Ocean Scientist
    Mar 28 at 1:18















0












$begingroup$


I have some code to calculate the mean bias between two arrays.



$$mean_bias=fracsum_i=1^na_i-b_in$$



and was hoping to represent the median instead:



$$median_bias=Median(a-b)$$



Does something like this hold true? But it's not sorted so index will not be the middle:



$$median_bias=sum_i=n/2^n/2+1a_i-b_i$$



How can I represent this?



Thanks










share|cite|improve this question









New contributor




Ocean Scientist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    This question does not concern mathematics and would be better suited for TeX - LaTeX Stackexchange.
    $endgroup$
    – Brian
    Mar 28 at 1:08











  • $begingroup$
    I tried there first and was suggested to ask here instead.
    $endgroup$
    – Ocean Scientist
    Mar 28 at 1:14






  • 1




    $begingroup$
    I don't understand the question
    $endgroup$
    – Jorge Fernández Hidalgo
    Mar 28 at 1:14










  • $begingroup$
    You can write median bias = median a - median b
    $endgroup$
    – Jorge Fernández Hidalgo
    Mar 28 at 1:15






  • 1




    $begingroup$
    The formula only, I can convert it into Tex myself.
    $endgroup$
    – Ocean Scientist
    Mar 28 at 1:18













0












0








0





$begingroup$


I have some code to calculate the mean bias between two arrays.



$$mean_bias=fracsum_i=1^na_i-b_in$$



and was hoping to represent the median instead:



$$median_bias=Median(a-b)$$



Does something like this hold true? But it's not sorted so index will not be the middle:



$$median_bias=sum_i=n/2^n/2+1a_i-b_i$$



How can I represent this?



Thanks










share|cite|improve this question









New contributor




Ocean Scientist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I have some code to calculate the mean bias between two arrays.



$$mean_bias=fracsum_i=1^na_i-b_in$$



and was hoping to represent the median instead:



$$median_bias=Median(a-b)$$



Does something like this hold true? But it's not sorted so index will not be the middle:



$$median_bias=sum_i=n/2^n/2+1a_i-b_i$$



How can I represent this?



Thanks







average means median






share|cite|improve this question









New contributor




Ocean Scientist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question









New contributor




Ocean Scientist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question








edited Mar 28 at 1:40







Ocean Scientist













New contributor




Ocean Scientist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Mar 28 at 0:52









Ocean ScientistOcean Scientist

32




32




New contributor




Ocean Scientist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Ocean Scientist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Ocean Scientist is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • $begingroup$
    This question does not concern mathematics and would be better suited for TeX - LaTeX Stackexchange.
    $endgroup$
    – Brian
    Mar 28 at 1:08











  • $begingroup$
    I tried there first and was suggested to ask here instead.
    $endgroup$
    – Ocean Scientist
    Mar 28 at 1:14






  • 1




    $begingroup$
    I don't understand the question
    $endgroup$
    – Jorge Fernández Hidalgo
    Mar 28 at 1:14










  • $begingroup$
    You can write median bias = median a - median b
    $endgroup$
    – Jorge Fernández Hidalgo
    Mar 28 at 1:15






  • 1




    $begingroup$
    The formula only, I can convert it into Tex myself.
    $endgroup$
    – Ocean Scientist
    Mar 28 at 1:18
















  • $begingroup$
    This question does not concern mathematics and would be better suited for TeX - LaTeX Stackexchange.
    $endgroup$
    – Brian
    Mar 28 at 1:08











  • $begingroup$
    I tried there first and was suggested to ask here instead.
    $endgroup$
    – Ocean Scientist
    Mar 28 at 1:14






  • 1




    $begingroup$
    I don't understand the question
    $endgroup$
    – Jorge Fernández Hidalgo
    Mar 28 at 1:14










  • $begingroup$
    You can write median bias = median a - median b
    $endgroup$
    – Jorge Fernández Hidalgo
    Mar 28 at 1:15






  • 1




    $begingroup$
    The formula only, I can convert it into Tex myself.
    $endgroup$
    – Ocean Scientist
    Mar 28 at 1:18















$begingroup$
This question does not concern mathematics and would be better suited for TeX - LaTeX Stackexchange.
$endgroup$
– Brian
Mar 28 at 1:08





$begingroup$
This question does not concern mathematics and would be better suited for TeX - LaTeX Stackexchange.
$endgroup$
– Brian
Mar 28 at 1:08













$begingroup$
I tried there first and was suggested to ask here instead.
$endgroup$
– Ocean Scientist
Mar 28 at 1:14




$begingroup$
I tried there first and was suggested to ask here instead.
$endgroup$
– Ocean Scientist
Mar 28 at 1:14




1




1




$begingroup$
I don't understand the question
$endgroup$
– Jorge Fernández Hidalgo
Mar 28 at 1:14




$begingroup$
I don't understand the question
$endgroup$
– Jorge Fernández Hidalgo
Mar 28 at 1:14












$begingroup$
You can write median bias = median a - median b
$endgroup$
– Jorge Fernández Hidalgo
Mar 28 at 1:15




$begingroup$
You can write median bias = median a - median b
$endgroup$
– Jorge Fernández Hidalgo
Mar 28 at 1:15




1




1




$begingroup$
The formula only, I can convert it into Tex myself.
$endgroup$
– Ocean Scientist
Mar 28 at 1:18




$begingroup$
The formula only, I can convert it into Tex myself.
$endgroup$
– Ocean Scientist
Mar 28 at 1:18










1 Answer
1






active

oldest

votes


















0












$begingroup$

You might be able to write something like this:



begingather
bias_textmedian
= frac12left(max_ilefta_i-b_i mid
leftlvertleftjmid a_i-b_i > a_j-b_jrightrightrvert < tfrac n2right \
qquadqquadqquadqquadqquad
+ min_ilefta_i-b_i mid
leftlvertleftjmid a_i-b_i < a_j-b_jrightrightrvert < tfrac n2right
right)
endgather



This is a way of saying that if $n$ is odd, you take the value $a_i - b_i$ that partitions the list of values $a_j - b_j$
(excluding $a_i - b_i$ itself) into two equal sets, one of values less than
$a_i - b_i$ and one of values greater; and if $n$ is even you take the mean
of the two values $a_i - b_i$ and $a_i' - b_i'$ that partition the list
of values $a_j - b_j$ (excluding those two values) into two equal sets.



But I think this is a rather horrible expression.



A better way is probably to define some notation of your own, for example,




The notation $textmedian(S)$ represents the median of the set $S$,




followed at some later time by an expression such as



$$ textmedian a_i - b_i mid 1 leq i leq n. $$






share|cite|improve this answer









$endgroup$












  • $begingroup$
    So there isn't a nice way of doing it. Interesting. I agree that the first one does the job, but it's a bit much! I think I will just define that median means median like your suggestion 2. Thanks very much!
    $endgroup$
    – Ocean Scientist
    Mar 28 at 4:12











Your Answer





StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Ocean Scientist is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3165333%2fwriting-median-rather-than-mean%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0












$begingroup$

You might be able to write something like this:



begingather
bias_textmedian
= frac12left(max_ilefta_i-b_i mid
leftlvertleftjmid a_i-b_i > a_j-b_jrightrightrvert < tfrac n2right \
qquadqquadqquadqquadqquad
+ min_ilefta_i-b_i mid
leftlvertleftjmid a_i-b_i < a_j-b_jrightrightrvert < tfrac n2right
right)
endgather



This is a way of saying that if $n$ is odd, you take the value $a_i - b_i$ that partitions the list of values $a_j - b_j$
(excluding $a_i - b_i$ itself) into two equal sets, one of values less than
$a_i - b_i$ and one of values greater; and if $n$ is even you take the mean
of the two values $a_i - b_i$ and $a_i' - b_i'$ that partition the list
of values $a_j - b_j$ (excluding those two values) into two equal sets.



But I think this is a rather horrible expression.



A better way is probably to define some notation of your own, for example,




The notation $textmedian(S)$ represents the median of the set $S$,




followed at some later time by an expression such as



$$ textmedian a_i - b_i mid 1 leq i leq n. $$






share|cite|improve this answer









$endgroup$












  • $begingroup$
    So there isn't a nice way of doing it. Interesting. I agree that the first one does the job, but it's a bit much! I think I will just define that median means median like your suggestion 2. Thanks very much!
    $endgroup$
    – Ocean Scientist
    Mar 28 at 4:12















0












$begingroup$

You might be able to write something like this:



begingather
bias_textmedian
= frac12left(max_ilefta_i-b_i mid
leftlvertleftjmid a_i-b_i > a_j-b_jrightrightrvert < tfrac n2right \
qquadqquadqquadqquadqquad
+ min_ilefta_i-b_i mid
leftlvertleftjmid a_i-b_i < a_j-b_jrightrightrvert < tfrac n2right
right)
endgather



This is a way of saying that if $n$ is odd, you take the value $a_i - b_i$ that partitions the list of values $a_j - b_j$
(excluding $a_i - b_i$ itself) into two equal sets, one of values less than
$a_i - b_i$ and one of values greater; and if $n$ is even you take the mean
of the two values $a_i - b_i$ and $a_i' - b_i'$ that partition the list
of values $a_j - b_j$ (excluding those two values) into two equal sets.



But I think this is a rather horrible expression.



A better way is probably to define some notation of your own, for example,




The notation $textmedian(S)$ represents the median of the set $S$,




followed at some later time by an expression such as



$$ textmedian a_i - b_i mid 1 leq i leq n. $$






share|cite|improve this answer









$endgroup$












  • $begingroup$
    So there isn't a nice way of doing it. Interesting. I agree that the first one does the job, but it's a bit much! I think I will just define that median means median like your suggestion 2. Thanks very much!
    $endgroup$
    – Ocean Scientist
    Mar 28 at 4:12













0












0








0





$begingroup$

You might be able to write something like this:



begingather
bias_textmedian
= frac12left(max_ilefta_i-b_i mid
leftlvertleftjmid a_i-b_i > a_j-b_jrightrightrvert < tfrac n2right \
qquadqquadqquadqquadqquad
+ min_ilefta_i-b_i mid
leftlvertleftjmid a_i-b_i < a_j-b_jrightrightrvert < tfrac n2right
right)
endgather



This is a way of saying that if $n$ is odd, you take the value $a_i - b_i$ that partitions the list of values $a_j - b_j$
(excluding $a_i - b_i$ itself) into two equal sets, one of values less than
$a_i - b_i$ and one of values greater; and if $n$ is even you take the mean
of the two values $a_i - b_i$ and $a_i' - b_i'$ that partition the list
of values $a_j - b_j$ (excluding those two values) into two equal sets.



But I think this is a rather horrible expression.



A better way is probably to define some notation of your own, for example,




The notation $textmedian(S)$ represents the median of the set $S$,




followed at some later time by an expression such as



$$ textmedian a_i - b_i mid 1 leq i leq n. $$






share|cite|improve this answer









$endgroup$



You might be able to write something like this:



begingather
bias_textmedian
= frac12left(max_ilefta_i-b_i mid
leftlvertleftjmid a_i-b_i > a_j-b_jrightrightrvert < tfrac n2right \
qquadqquadqquadqquadqquad
+ min_ilefta_i-b_i mid
leftlvertleftjmid a_i-b_i < a_j-b_jrightrightrvert < tfrac n2right
right)
endgather



This is a way of saying that if $n$ is odd, you take the value $a_i - b_i$ that partitions the list of values $a_j - b_j$
(excluding $a_i - b_i$ itself) into two equal sets, one of values less than
$a_i - b_i$ and one of values greater; and if $n$ is even you take the mean
of the two values $a_i - b_i$ and $a_i' - b_i'$ that partition the list
of values $a_j - b_j$ (excluding those two values) into two equal sets.



But I think this is a rather horrible expression.



A better way is probably to define some notation of your own, for example,




The notation $textmedian(S)$ represents the median of the set $S$,




followed at some later time by an expression such as



$$ textmedian a_i - b_i mid 1 leq i leq n. $$







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Mar 28 at 3:47









David KDavid K

55.4k345120




55.4k345120











  • $begingroup$
    So there isn't a nice way of doing it. Interesting. I agree that the first one does the job, but it's a bit much! I think I will just define that median means median like your suggestion 2. Thanks very much!
    $endgroup$
    – Ocean Scientist
    Mar 28 at 4:12
















  • $begingroup$
    So there isn't a nice way of doing it. Interesting. I agree that the first one does the job, but it's a bit much! I think I will just define that median means median like your suggestion 2. Thanks very much!
    $endgroup$
    – Ocean Scientist
    Mar 28 at 4:12















$begingroup$
So there isn't a nice way of doing it. Interesting. I agree that the first one does the job, but it's a bit much! I think I will just define that median means median like your suggestion 2. Thanks very much!
$endgroup$
– Ocean Scientist
Mar 28 at 4:12




$begingroup$
So there isn't a nice way of doing it. Interesting. I agree that the first one does the job, but it's a bit much! I think I will just define that median means median like your suggestion 2. Thanks very much!
$endgroup$
– Ocean Scientist
Mar 28 at 4:12










Ocean Scientist is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Ocean Scientist is a new contributor. Be nice, and check out our Code of Conduct.












Ocean Scientist is a new contributor. Be nice, and check out our Code of Conduct.











Ocean Scientist is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3165333%2fwriting-median-rather-than-mean%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Boston (Lincolnshire) Stedsbyld | Berne yn Boston | NavigaasjemenuBoston Borough CouncilBoston, Lincolnshire

Trouble understanding the speech of overseas colleaguesHow can I better understand manager or clients with strong accents?Adding more movement and speech at the fundamental level to a highly-sedentary job?Difficulty in understanding Manager's accent(language and communication)How to adjust yourself where your colleagues are not understanding to you?Understanding manager's expectationsForeigner and colleagues using slangHaving difficulty understanding meetingsHow do you breathe when giving a speech?Trouble Waking Up for Emergencies (On-Call)Problems with colleaguesColleagues feeling insecure when I do my work

Ballerup Komuun Stääden an saarpen | Futnuuten | Luke uk diar | Nawigatsjuunwww.ballerup.dkwww.statistikbanken.dk: Tabelle BEF44 (Folketal pr. 1. januar fordelt på byer)Commonskategorii: Ballerup Komuun55° 44′ N, 12° 22′ O