<blockquote>
<pre><code>Block generation time for block#n= (timestamp of block#n+1) - (timestamp of block#n)
</code></pre>
</blockquote>

<p>I'd say the block generation time for <code>block#n</code> should be:</p>

<pre><code>genTime(block#n) = timestamp(block#n) - timestamp(block#n-1)
</code></pre>

<p>However, this doesn't explain the huge discrepancy.</p>

<p>If you're sure that 1) you're using the same dataset, i.e. the same window of blocks!, and 2) calculating exactly the same quantity as they are, and still arrive at different results, you might want to get in touch with the authors of the paper to compare notes and see where your calculations differ.</p>

CC BY-SA 3.0
2017-05-20T18:36:58.100Z
2017-05-20T18:36:58.100Z
Murch
<p>I'm working on paper <a href="http://dl.acm.org/citation.cfm?id=2382292" rel="nofollow noreferrer">Double-Spending Attacks on Fast Payments in Bitcoin</a>.</p>

<p>And I see they give out the result :</p>

<blockquote>
  <p>block generation time is approximately 10 minutes (9 minutes and 54
  seconds), the standard deviation of the measurements was about 881.24
  seconds</p>
</blockquote>

<p>They used data from <a href="https://blockexplorer.com/" rel="nofollow noreferrer">blockexplorer</a>, with data from block #0 to block # 153260.</p>

<p>Here is the data of Block #0 and Block #1
<a href="https://i.sstatic.net/BT7HP.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BT7HP.jpg" alt="enter image description here"></a></p>

<p><a href="https://i.sstatic.net/0ApYS.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0ApYS.jpg" alt="enter image description here"></a>
Then I calculate block generation as:</p>

<pre><code> Block generation time for block#n= (timestamp of block#n+1) - (timestamp of block#n)
</code></pre>

<p>But I get the result as below:</p>

<pre><code>Mean: 9.8 minute = 9 minute 48 secod 

standard deviation: 1477.469066205157
</code></pre>

<p>It's quite different to paper aforementioned paper.</p>

<p>If anyone worked or know how to work with blockchain data, please help me.</p>

CC BY-SA 3.0
2017-05-12T02:42:12.900Z
Does anyone help me?
phuong
<timestamp><block-interval>
How to calculate block generation time from block's data?
phuong
# How to calculate block generation time from block's data?

(Asked by: username_0 on 2017-05-11)

I'm working on paper [Double-Spending Attacks on Fast Payments in Bitcoin](http://dl.acm.org/citation.cfm?id=2382292).

And I see they give out the result :

> block generation time is approximately 10 minutes (9 minutes and 54
> seconds), the standard deviation of the measurements was about 881.24
> seconds

They used data from [blockexplorer](https://blockexplorer.com/), with data from block #0 to block # 153260.

Here is the data of Block #0 and Block #1
[![enter image description here](https://i.sstatic.net/BT7HP.jpg)](https://i.sstatic.net/BT7HP.jpg)

[![enter image description here](https://i.sstatic.net/0ApYS.jpg)](https://i.sstatic.net/0ApYS.jpg)
Then I calculate block generation as:

```
 Block generation time for block#n= (timestamp of block#n+1) - (timestamp of block#n)

```

But I get the result as below:

```
Mean: 9.8 minute = 9 minute 48 secod 

standard deviation: 1477.469066205157

```

It's quite different to paper aforementioned paper.

If anyone worked or know how to work with blockchain data, please help me.

**Tags:** timestamp, block-interval

> **Comments:**
> **username_0**: Does anyone help me?  

---

## 1 answers

### Answer by username_1 on 2017-05-20. Score: 1

> ```
> Block generation time for block#n= (timestamp of block#n+1) - (timestamp of block#n)
>
> ```

I'd say the block generation time for `block#n` should be:

```
genTime(block#n) = timestamp(block#n) - timestamp(block#n-1)

```

However, this doesn't explain the huge discrepancy.

If you're sure that 1) you're using the same dataset, i.e. the same window of blocks!, and 2) calculating exactly the same quantity as they are, and still arrive at different results, you might want to get in touch with the authors of the paper to compare notes and see where your calculations differ.


---

