<% experiments.each do |experiment| %>
  <% results = experiment.results %>

  <h2>
    <%= experiment.name %>
    <small><%= link_to "Details", experiment_path(experiment.id) %></small>
  </h2>


  <% if experiment.description %>
    <p class="description"><%= experiment.description %></p>
  <% end %>

  <table>
    <thead>
      <tr>
        <th>Variant</th>
        <th style="width: 20%;">Participants</th>
        <th style="width: 20%;">Conversions</th>
        <th style="width: 20%;">Conversion Rate</th>
        <th style="width: 20%;">Prob Winning</th>
      </tr>
    </thead>
    <tbody>
      <% results.each do |variant, result| %>
        <tr>
          <td>
            <%= variant %>
            <% if variant == experiment.winner %>
              <span class="check">✓</span>
            <% end %>
          </td>
          <td><%= result[:participated] %></td>
          <td><%= result[:converted] %></td>
          <td>
            <% if result[:conversion_rate] %>
              <%= (100.0 * result[:conversion_rate]).round %>%
            <% else %>
              -
            <% end %>
          </td>
          <td>
            <% if result[:prob_winning] %>
              <%= (100.0 * result[:prob_winning]).round %>%
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% end %>

<% experiments.each do |experiment| %>
  <% results = experiment.results %>

  <h2>
    <%= experiment.name %>
    <small><%= link_to "Details", experiment_path(experiment.id) %></small>
  </h2>


  <% if experiment.description %>
    <p class="description"><%= experiment.description %></p>
  <% end %>

  <table>
    <thead>
      <tr>
        <th>Variant</th>
        <th style="width: 20%;">Participants</th>
        <th style="width: 20%;">Conversions</th>
        <th style="width: 20%;">Conversion Rate</th>
        <th style="width: 20%;">Prob Winning</th>
      </tr>
    </thead>
    <tbody>
      <% results.each do |variant, result| %>
        <tr>
          <td>
            <%= variant %>
            <% if variant == experiment.winner %>
              <span class="check">✓</span>
            <% end %>
          </td>
          <td><%= result[:participated] %></td>
          <td><%= result[:converted] %></td>
          <td>
            <% if result[:conversion_rate] %>
              <%= (100.0 * result[:conversion_rate]).round %>%
            <% else %>
              -
            <% end %>
          </td>
          <td>
            <% if result[:prob_winning] %>
              <% if result[:prob_winning] < 0.01 %>
                &lt; 1%
              <% else %>
                <%= (100.0 * result[:prob_winning]).round %>%
              <% end %>
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% end %>

Use < 1% when winning probability is low
Use < 1% when winning probability is low
