Analytics average time from each second count
$begingroup$
So to visualise the problem heres the mocked data that i use.
1s => 2840,
2s => 2042,
3s => 1106,
4s => 269,
5s => 409,
6s => 0,
7s => 449,
8s => 531,
9s => 910
What i would like to achieve is to get the time value (s) which applies to the all counts average, thats been weighted depending on the time and count.
As for simpler example to understand what i mean
1s => 10,
2s => 0,
3s => 10
The output would be 2s
real-analysis
$endgroup$
add a comment |
$begingroup$
So to visualise the problem heres the mocked data that i use.
1s => 2840,
2s => 2042,
3s => 1106,
4s => 269,
5s => 409,
6s => 0,
7s => 449,
8s => 531,
9s => 910
What i would like to achieve is to get the time value (s) which applies to the all counts average, thats been weighted depending on the time and count.
As for simpler example to understand what i mean
1s => 10,
2s => 0,
3s => 10
The output would be 2s
real-analysis
$endgroup$
add a comment |
$begingroup$
So to visualise the problem heres the mocked data that i use.
1s => 2840,
2s => 2042,
3s => 1106,
4s => 269,
5s => 409,
6s => 0,
7s => 449,
8s => 531,
9s => 910
What i would like to achieve is to get the time value (s) which applies to the all counts average, thats been weighted depending on the time and count.
As for simpler example to understand what i mean
1s => 10,
2s => 0,
3s => 10
The output would be 2s
real-analysis
$endgroup$
So to visualise the problem heres the mocked data that i use.
1s => 2840,
2s => 2042,
3s => 1106,
4s => 269,
5s => 409,
6s => 0,
7s => 449,
8s => 531,
9s => 910
What i would like to achieve is to get the time value (s) which applies to the all counts average, thats been weighted depending on the time and count.
As for simpler example to understand what i mean
1s => 10,
2s => 0,
3s => 10
The output would be 2s
real-analysis
real-analysis
asked Nov 13 '18 at 15:12
Maanus IndovMaanus Indov
1034
1034
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
It looks like the data that you're giving is something like: you ran many trials of the same experiment, which tests how long something takes— in 2840 trials it took 1 second, in 2042 trials it took 2 seconds, and so on...
In this case, one simply takes the weighted average:
$$frac{2840+4084+3318+1076+2045+0+3143+4248+8190}{2840+2042+1106+269+409+0+449+531+910} = 3.38288920056dots. $$
$endgroup$
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2996843%2fanalytics-average-time-from-each-second-count%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
$begingroup$
It looks like the data that you're giving is something like: you ran many trials of the same experiment, which tests how long something takes— in 2840 trials it took 1 second, in 2042 trials it took 2 seconds, and so on...
In this case, one simply takes the weighted average:
$$frac{2840+4084+3318+1076+2045+0+3143+4248+8190}{2840+2042+1106+269+409+0+449+531+910} = 3.38288920056dots. $$
$endgroup$
add a comment |
$begingroup$
It looks like the data that you're giving is something like: you ran many trials of the same experiment, which tests how long something takes— in 2840 trials it took 1 second, in 2042 trials it took 2 seconds, and so on...
In this case, one simply takes the weighted average:
$$frac{2840+4084+3318+1076+2045+0+3143+4248+8190}{2840+2042+1106+269+409+0+449+531+910} = 3.38288920056dots. $$
$endgroup$
add a comment |
$begingroup$
It looks like the data that you're giving is something like: you ran many trials of the same experiment, which tests how long something takes— in 2840 trials it took 1 second, in 2042 trials it took 2 seconds, and so on...
In this case, one simply takes the weighted average:
$$frac{2840+4084+3318+1076+2045+0+3143+4248+8190}{2840+2042+1106+269+409+0+449+531+910} = 3.38288920056dots. $$
$endgroup$
It looks like the data that you're giving is something like: you ran many trials of the same experiment, which tests how long something takes— in 2840 trials it took 1 second, in 2042 trials it took 2 seconds, and so on...
In this case, one simply takes the weighted average:
$$frac{2840+4084+3318+1076+2045+0+3143+4248+8190}{2840+2042+1106+269+409+0+449+531+910} = 3.38288920056dots. $$
answered Dec 19 '18 at 4:33
aleph_twoaleph_two
24912
24912
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2996843%2fanalytics-average-time-from-each-second-count%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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