<?xml version="1.0" encoding="UTF-8"?>
<!--
	This is an XML file so certain characters need special treatment:
		For ampersand, use &amp;
		For single quote, use &quot;
		For left angle bracket, use &lt;
		For right angle bracket, use &rt;
	Leading and trailing whitespace may be trimmed.
-->
<riskDisplay>

<palette good="0xffcc33" bad="0xff6000" better="0x00ff00" worse="0xcc0000" remainder="0xdddddd"/>

<!-- one for each tab that shows in the animation. The id is used in references below -->
<presets>
  <preset  title="Bacon sandwiches" subtitle="Harms of eating bacon" tab="Risks" A="Bacon sandwiches" B="bowel cancer" P0="0.05" P1="0.06" sigfigs="2">
   </preset>
  <preset title="Statins 10yr" subtitle="Benefits of Statins in 10 years" tab="Benefits" A="Statins" B="a heart attack or stroke in 10 years" P0="0.1" P1="0.08" sigfigs="2">
  </preset>
</presets>

<!--
    List of statements. These are selected by their attributes 
    - type 
      - relative
	- absolute
	- nnt 
    - format
      - chance_pc
	- chance_nf
      - population_pc
	- population_nf
    - frame
      - negative
	- positive

    In case of repeats, all statements matching an attribute set will show.
    Valid curly bracket formats are [A], [B] or any algebraic expression
    involving P0, P1, D (D = the natural frequency denominator). 

    To get a suitable precision you can round(an expression).
  -->

<legends>
	<legend type="relative" target="chance" format="pc" frame="negative">
    	<Banyway rgb="bad">experience anyway</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
		<BavoidAnyway rgb="remainder">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="remainder">avoided without [A]</BavoidWithout>
	</legend>

  <legend type="relative" target="chance" format="pc" frame="positive">				
      	<Banyway rgb="remainder">not helped</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
		<BavoidAnyway rgb="good">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="remainder">avoided without [A]</BavoidWithout>
  </legend>

  <legend type="relative" target="population" format="pc" frame="negative">				
     	<Banyway rgb="bad">experience anyway</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
		<BavoidAnyway rgb="remainder">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="remainder">avoided without [A]</BavoidWithout>
  </legend>

  <legend type="relative" target="population" format="pc" frame="positive">				
      	<Banyway rgb="remainder">not helped</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
		<BavoidAnyway rgb="good">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="remainder">avoided without [A]</BavoidWithout>
  </legend>

  <legend type="relative" target="possible-futures" format="pc" frame="negative">				
    	<Banyway rgb="bad">experience anyway</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
		<BavoidAnyway rgb="remainder">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="remainder">avoided without [A]</BavoidWithout>
  </legend>

  <legend type="relative" target="possible-futures" format="pc" frame="positive">				
      	<Banyway rgb="remainder">not helped</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
		<BavoidAnyway rgb="good">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="remainder">avoided without [A]</BavoidWithout>
  </legend>

  <legend type="absolute" target="chance" format="pc" frame="negative">				
    	<Banyway rgb="bad">experience anyway</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
		<BavoidAnyway rgb="remainder">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="remainder">avoided with</BavoidWith>
		<BavoidWithout rgb="remainder">avoided without</BavoidWithout>
  </legend>

  <legend type="absolute" target="chance" format="pc" frame="positive">				
     	<Banyway rgb="remainder">not helped</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="">[B] with [A]</Bwith>
		<BavoidAnyway rgb="good">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="good">avoided without [A]</BavoidWithout>
   </legend>

  <legend type="absolute" target="chance" format="nf" frame="negative">				
    	<Banyway rgb="bad">experience anyway</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
		<BavoidAnyway rgb="remainder">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="remainder"></BavoidWith>
		<BavoidWithout rgb="remainder"></BavoidWithout>
  </legend>

  <legend type="absolute" target="chance" format="nf" frame="positive">				
     	<Banyway rgb="remainder">not helped</Banyway>
     	<Bwithout rgb="remainder">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="">[B] with [A]</Bwith>
		<BavoidAnyway rgb="good">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="good">avoided without [A]</BavoidWithout>
  </legend>

  <legend type="absolute" target="population" format="pc" frame="negative">				
    	<Banyway rgb="bad">experience anyway</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
 		<BavoidAnyway rgb="remainder">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="remainder"></BavoidWith>
		<BavoidWithout rgb="remainder"></BavoidWithout>
  </legend>

  <legend type="absolute" target="population" format="pc" frame="positive">				
     	<Banyway rgb="remainder">not helped</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="">[B] with [A]</Bwith>
		<BavoidAnyway rgb="good">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="good">avoided without [A]</BavoidWithout>
  	</legend>

   <legend type="absolute" target="population" format="nf" frame="negative">				
    	<Banyway rgb="bad">experience anyway</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
 		<BavoidAnyway rgb="remainder">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="remainder"></BavoidWith>
		<BavoidWithout rgb="remainder"></BavoidWithout>
  	</legend>

  	<legend type="absolute" target="population" format="nf" frame="positive">				
     	<Banyway rgb="remainder">not helped</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="">[B] with [A]</Bwith>
		<BavoidAnyway rgb="good">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="good">avoided without [A]</BavoidWithout>
  	</legend>

	<legend type="absolute" target="possible-futures" format="pc" frame="negative">				
		<title>Of all possible outcomes, the percent in which you experience [B]</title>
    	<Banyway rgb="bad">experience anyway</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
 		<BavoidAnyway rgb="remainder">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="remainder"></BavoidWith>
		<BavoidWithout rgb="remainder"></BavoidWithout>
  </legend>

  <legend type="absolute" target="possible-futures" format="pc" frame="positive">				
		<title>Of all possible outcomes, the percent in which you avoid [B]</title>
     	<Banyway rgb="remainder">not helped</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="">[B] with [A]</Bwith>
		<BavoidAnyway rgb="good">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="good">avoided without [A]</BavoidWithout>
  </legend>

  <legend type="absolute" target="possible-futures" format="nf" frame="negative">				
		<title>Of [D] possible outcomes, the number in which you experience [B]</title>
    	<Banyway rgb="bad">experience anyway</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="bad">[B] with [A]</Bwith>
 		<BavoidAnyway rgb="remainder">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="remainder"></BavoidWith>
		<BavoidWithout rgb="remainder"></BavoidWithout>
  </legend>

  <legend type="absolute" target="possible-futures" format="nf" frame="positive">				
		<title>Of [D] possible outcomes, the number in which you avoid [B]</title>
    	<Banyway rgb="bad">not helped</Banyway>
     	<Bwithout rgb="bad">[B] without [A]</Bwithout>
		<BmoreWith rgb="worse">harmed by [A]</BmoreWith>
		<BlessWith rgb="better">saved by [A]</BlessWith>
    	<Bwith rgb="">[B] with [A]</Bwith>
		<BavoidAnyway rgb="good">avoided anyway</BavoidAnyway>
		<BavoidWith rgb="good">avoided with [A]</BavoidWith>
		<BavoidWithout rgb="good">avoided without [A]</BavoidWithout>
  </legend>
</legends>


<!-- statements which may appear on the Risks tab -->
<statements tab="Risks">
  <statement type="relative" target="chance" format="pc" frame="negative">
    [A] increases your chance of experiencing [B] by [round((P1/P0 - 1) * 100)]%.
  </statement>

  <statement type="relative" target="chance" format="pc" frame="positive">				
    [A] reduces your chance of avoiding [B] by [round((P1 - P0)*1000/(1 - P0))/10]%.
  </statement>

  <statement type="relative" target="population" format="pc" frame="negative">				
    With [A],  [round((P1/P0 - 1) * 100)]% more people like you will experience [B].
  </statement>

  <statement type="relative" target="population" format="pc" frame="positive">				
    With [A],  [round((P1 - P0)*1000/(1 - P0))/10]% fewer people like you will avoid [B].
  </statement>

  <statement type="relative" target="possible-futures" format="pc" frame="negative">
    With [A],  [round((P1/P0 - 1) * 100)]% more possible outcomes for you will include experiencing [B].
  </statement>

  <statement type="relative" target="possible-futures" format="pc" frame="positive">
    With [A],  [round((P1 - P0)*1000/(1 - P0))/10]% fewer possible outcomes for you will include avoiding [B].
  </statement>



  <statement type="absolute" target="chance" format="pc" frame="negative">				
    Your chance of experiencing [B] without [A] is [round(P0 * 1000)/10]%, which is increased to [round(P1 * 1000)/10]% with [A].
  </statement>

  <statement type="absolute" target="chance" format="pc" frame="positive">				
    Your chance of avoiding [B] without [A] is [round((1-P0) * 1000)/10]%, which is reduced to [round((1-P1) * 1000)/10]% with [A].
  </statement>

     <statement type="absolute" target="chance" format="nf" frame="negative">				
    Your chance of experiencing [B] without [A] is [round(P0 * D)] in [D], which is increased to [round(P1 * D)] in [D] with [A].
  </statement>

  <statement type="absolute" target="chance" format="nf" frame="positive">				
    Your chance of avoiding [B] without [A] is [round((1-P0) * D)] in [D], which is reduced to [round((1-P1) * D)] in [D] with [A].
  </statement>

  <statement type="absolute" target="population" format="pc" frame="negative">				
    [round(P0 * 1000)/10]% of people like you will experience [B] without [A], which is increased to [round(P1 * 1000)/10]% with [A].
  </statement>

  <statement type="absolute" target="population" format="pc" frame="positive">				
    [round((1-P0)*1000)/10]% of people like you will avoid [B] without [A], which is reduced to [round((1-P1)*1000)/10]%  percent with [A].
  </statement>

  <statement type="absolute" target="population" format="nf" frame="negative">				
    [round(P0 * D)] out of [D] people  like you will experience [B] without [A], which is increased to [round(P1 * D)] out of [D] with [A]. 
  </statement>

  <statement type="absolute" target="population" format="nf" frame="positive">				
    [round((1 - P0) * D)] out of [D] people  like you will be free of [B] without [A], which is reduced to [round((1 - P1) * D)] out of [D] with [A].
  </statement>

  <statement type="absolute" target="possible-futures" format="pc" frame="negative">				
    Of all possible outcomes for you, [round(P0 * 1000)/10]% will involve experiencing [B] without [A], which is increased to [round(P1 * 1000)/10]% with [A].
  </statement>

  <statement type="absolute" target="possible-futures" format="pc" frame="positive">				
    Of all possible outcomes for you, [round((1-P0)*1000)/10]% will involve avoiding  [B] without [A], which is reduced to [round((1-P1)*1000)/10]% with [A].
  </statement>

  <statement type="absolute" target="possible-futures" format="nf" frame="negative">				
    Of [D] possible outcomes for you, [round(P0 * D)] will involve experiencing [B] without [A], which is increased to [round(P1 * D)] out of [D] with [A]. 
  </statement>

  <statement type="absolute" target="possible-futures" format="nf" frame="positive">				
    Of [D]  possible outcomes for you, [round((1 - P0) * D)] will involve avoiding [B] without [A], which is reduced [round((1 - P1) * D)] out of [D] with [A].
  </statement>

  <statement type="nnt">				
    If we treated [round(1/(P1 - P0))] people like you with [A] we would have one extra person experiencing [B].
  </statement>

</statements>

<!-- statements which may appear on the Benefits tab -->
<statements tab="Benefits">
 <statement type="relative" target="chance" format="pc" frame="negative">
    [A] reduces your chance of experiencing [B] by [round((1 - P1/P0) * 100)]%.
  </statement>

  <statement type="relative" target="chance" format="pc" frame="positive">				
    [A] increases your chance of avoiding [B] by [round((P0 - P1)*100/(1 - P0))]%.
  </statement>

  <statement type="relative" target="population" format="pc" frame="negative">				
    With [A],  [round((1 - P1/P0) * 100)]% fewer people  like you will experience [B].
  </statement>

  <statement type="relative" target="population" format="pc" frame="positive">				
    With [A],  [round((P0 - P1)*100/(1 - P0))]% more people  like you will avoid [B].
  </statement>

  <statement type="relative" target="possible-futures" format="pc" frame="negative">
    With [A],  [round((1 - P1/P0) * 100)]% fewer possible outcomes for you will include experiencing [B].
  </statement>

  <statement type="relative" target="possible-futures" format="pc" frame="positive">
    With [A],  [round((P0 - P1)*100/(1 - P0))]% more possible outcomes for you will include avoiding [B].
  </statement>

  <statement type="absolute" target="chance" format="pc" frame="negative">				
    Your chance of experiencing [B] without [A] is [round(P0 * 1000)/10]%, which is reduced to [round(P1 * 1000)/10]% with [A].
  </statement>

  <statement type="absolute" target="chance" format="pc" frame="positive">				
    Your chance of avoiding [B] without [A] is [round((1-P0) * 1000)/10]%, which is increased to [round((1-P1) * 1000)/10]% with [A].
  </statement>

     <statement type="absolute" target="chance" format="nf" frame="negative">				
    Your chance of experiencing [B] without [A] is [round(P0 * D)] in [D], which is reduced to [round(P1 * D)] in [D] with [A].
  </statement>

  <statement type="absolute" target="chance" format="nf" frame="positive">				
    Your chance of avoiding [B] without [A] is [round((1-P0) * D)] in [D], which is increased to [round((1-P1) * D)] in [D] with [A].
  </statement>

  <statement type="absolute" target="population" format="pc" frame="negative">				
    [round(P0 * 1000)/10]% of people like you will experience [B] without [A], which is reduced to [round(P1 * 1000)/10]% with [A].
  </statement>

  <statement type="absolute" target="population" format="pc" frame="positive">				
    [round((1-P0)*1000)/10]% of people like you will be avoid [B] without [A], which is increased to [round((1-P1)*1000)/10]%  percent with [A].
  </statement>

  <statement type="absolute" target="population" format="nf" frame="negative">				
    [round(P0 * D)] out of [D] people  like you will experience [B] without [A], which is reduced to [round(P1 * D)] out of [D] with [A]. 
  </statement>

  <statement type="absolute" target="population" format="nf" frame="positive">				
    [round((1 - P0) * D)] out of [D] people  like you will be free of [B] without [A], which is increased to [round((1 - P1) * D)] out of [D] with [A].
  </statement>

    <statement type="absolute" target="possible-futures" format="pc" frame="negative">				
    Of all possible outcomes for you, [round(P0 * 1000)/10]% will involve experiencing [B] without [A], which is reduced to [round(P1 * 1000)/10]% with [A].
  </statement>

  <statement type="absolute" target="possible-futures" format="pc" frame="positive">				
    Of all possible outcomes for you, [round((1-P0)*1000)/10]% will involve avoiding [B] without [A], which is increased to [round((1-P1)*1000)/10]% with [A].
  </statement>

  <statement type="absolute" target="possible-futures" format="nf" frame="negative">				
    Of [D] possible outcomes for you, [round(P0 * D)] will involve experiencing [B] without [A], which is reduced to [round(P1 * D)] out of [D] with [A]. 
  </statement>

  <statement type="absolute" target="possible-futures" format="nf" frame="positive">				
    Of [D]  possible outcomes for you, [round((1 - P0) * D)] will involve avoiding [B] without [A], which is increased [round((1 - P1) * D)] out of [D] with [A].
  </statement>

  <statement type="nnt">				
    In order to save one person from experiencing [B], we would need to treat [round(1/(P0 - P1))] people like you with [A].
  </statement>

</statements>

</riskDisplay>