Go Back   SitePoint Forums > Forum Index > Program Your Site > JavaScript
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old May 20, 2002, 09:38   #1
rwar
SitePoint Addict
 
rwar's Avatar
 
Join Date: Sep 2001
Location: PF / RS / BR
Posts: 206
how to show a scroll bar in this file?

How can I insert a scroll bar in this script? I cannot see the last answers of the quiz, so I must put a scroll bar to see them. Or if someone have another idea that I can work on...

Thanks.

P.S.: the link is this

PHP Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<!--
saved from url=(0022)[url]http://internet.e-mail[/url] -->
<!-- TWO STEPS TO INSTALL JAVASCRIPT QUIZ:

  
1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document  
-->
<!--
STEP ONE: Paste this code into the HEAD of your HTML document  -->
<
html>

<
head>
<
title>Java Quiz</title>
<
meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<
script language="JavaScript">

<!--
This script and many more are available free online at -->
<!--
The JavaScript Source!! [url]http://javascript.internet.com[/url] -->

<!-- Begin
var ans = new Array;
var
done = new Array;
var
yourAns = new Array;
var
explainAnswer = new Array;

var
score = 0;
ans[1] = "a";
ans[2] = "a";
ans[3] = "d";
ans[4] = "b";
ans[5] = "b";
ans[6] = "b";
ans[7] = "c";
ans[8] = "b";
ans[9] = "a";
ans[10] = "c";
ans[11] = "d";

explainAnswer[1]="A hipótese Nula é o que estamos sempre testando";
explainAnswer[2]="Blah Blah Blah";
explainAnswer[3]="Blah Blah Blah";
explainAnswer[4]="Blah Blah Blah";
explainAnswer[5]="Blah Blah Blah";
explainAnswer[6]="Blah Blah Blah";
explainAnswer[7]="Blah Blah Blah";
explainAnswer[8]="Blah Blah Blah";
explainAnswer[9]="Blah Blah Blah";
explainAnswer[10]="Blah Blah Blah";
explainAnswer[11]="Blah Blah Blah";

function
Engine(question, answer) {
yourAns[question]=answer;
}

function
Score(){
var
answerText = "Como fui no simulado?\n------------------------------------\n";
for(
i=1;i<=17;i++){
   
answerText=answerText+"\nPergunta :"+i+"\n";
  if(
ans[i]!=yourAns[i]){
    
answerText=answerText+"\nA resposta correta era "+ans[i]+"\n"+explainAnswer[i]+"\n";
  }
  else{
    
answerText=answerText+" \nCorreto! \n";
    
score++;
  }
}

answerText=answerText+"\n\nO total de ponto é : "+score+"\n";

//now score the user
answerText=answerText+"\nComentário : ";
if(
score<=0){
answerText=answerText+"Precisa estudar mais";
}
if(
score>=1 && score <=2){
answerText=answerText+"Um pouco mais de atenção";
}
if(
score>=3 && score <=3){
answerText=answerText+"Está indo bem";
}
if(
score>4){
answerText=answerText+"Você agora domina os princípios da estatística!";
}

alert(answerText);

}
//  End -->
</script>
<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->

<meta content="Microsoft FrontPage 3.0" name="GENERATOR">
</head>

<body>
<div align="center">

<h1>Prova Simulada de G2</h1>
<b>

<p>Teste os seus conhecimentos sobre os testes de hipóteses</b></p>

<hr>

<form>
  <b><p>1. Em um teste estatístico a hipótese sendo testada é:</b><br>
  <input onclick="Engine(1, this.value)" type="radio" value="a" name="q1">a) Hipótese Nula<br>
  <input onclick="Engine(1, this.value)" type="radio" value="b" name="q1">b) Hipótese
  verdadeira<br>
  <input onclick="Engine(1, this.value)" type="radio" value="c" name="q1">c) Hipótese de
  teste <br>
  <input onclick="Engine(1, this.value)" type="radio" value="d" name="q1">d) Hipótese
  alternativa</p>

  <p><b>2. Um pesquisador fez um estudo para comparar as horas de sono de estudantes do
  segundo e daqueles cursando universidade, A hipótese nula mais natural seria:</b><br>
  <input onclick="Engine(2, this.value)" type="radio" value="a" name="q2">a) média horas de
  sono segundo grau=média horas de sono universidade<br>
  <input onclick="Engine(2, this.value)" type="radio" value="b" name="q2">b) média horas de
  sono segundo grau&gt;média horas de sono universidade<br>
  <input onclick="Engine(2, this.value)" type="radio" value="c" name="q2">c)média horas de
  sono segundo grau&lt;média horas de sono universidade&nbsp; <br>
  </p>

  <p><b>3. A maior evidência a favor da hipótese nula ocorre quando?</b><br>
  <input onclick="Engine(3, this.value)" type="radio" value="a" name="q3">a) mu=0<br>
  <input onclick="Engine(3, this.value)" type="radio" value="b" name="q3">b) t=1<br>
  <input onclick="Engine(3, this.value)" type="radio" value="c" name="q3">c) z=1<br>
  <input onclick="Engine(3, this.value)" type="radio" value="d" name="q3">d) p=1 </p>
  <p><b>&nbsp;</b><img height="64" alt="a02.jpg (2027 bytes)" src="a02.jpg" width="102"><b>Considerando
  a fórmula&nbsp; do erro padrão da média use o gráfico interativo abaixo e responda as
  perguntas 3,4,5 e 6.</b></p>
  <p>&nbsp;</p>
  <table>
<TBODY>
    <tr>
      <td vAlign="top" align="left" width="80%"><font face="Arial"><br>
      </font></td>
      <td width="20%"></td>
    </tr>
    <tr>
      <td vAlign="top" align="left" width="25"></td>
      <td vAlign="top" align="left" width="80%"><div align="center"><center><table
      cellSpacing="0" cellPadding="6" width="100%" border="0">
<TBODY>
        <tr>
          <td vAlign="top" align="middle" width="25%" bgColor="#cccc99"><div align="left"><table
          cellSpacing="0" cellPadding="12" width="100%" border="0">
<TBODY>
            <tr>
              <td width="100%"><small><font face="Arial">Para obter o valor de Z e a a sua probabilidade
              , simplesmente entre com os valores nas caixas de texto e tecle ´enter´ para atualizar o
              gráfico, </font></small></td>
            </tr>
</TBODY>
          </table>
          </div></td>
          <td vAlign="top" align="middle" bgColor="#cccc99"><font face="Arial"><!-- java applet goes here -->
          <applet codeBase="../../seeing1999/ssapplets/" height="250" width="250" code="ZTest.class">
            <param name="mean" value="10">
            <param name="n" value="15">
            <param name="stdev" value="2.236">
            <param name="tailtype" value="Two-Tailed">
            <param name="zend" value="2.65">
            <param name="codeBase" value="../../seeing1999/ssapplets/">
            <param name="height" value="250">
            <param name="width" value="250">
            <param name="code" value="ZTest.class">
          </applet>
          </font></td>
        </tr>
</TBODY>
      </table>
      </center></div></td>
      <td vAlign="bottom" align="left" width="20%">&nbsp; <div align="left"><table
      cellSpacing="0" cellPadding="0" width="100%" border="0">
<TBODY>
       <tr>
          <td vAlign="bottom" align="left" width="100%"><br>
          <br>
          <br>
          </td>
        </tr>
</TBODY>
      </table>
      </div></td>
    </tr>
</TBODY>
  </table>

  <div align="center"><center><p><strong>4. A hipótese nula é mu 0=10 : mu A&gt;10, A
  média dos valores amostrados é 11,53 e o número de observações é 15. O desvio&nbsp;
  padrão é 2,23. Considerando o valor de Z. Qual a sua decisão? </strong><br>
  <input onclick="Engine(4, this.value)" type="radio" value="a" name="q4">Aceita H0<br>
  <input onclick="Engine(4, this.value)" type="radio" value="b" name="q4">Rejeita H0<br>
  <input onclick="Engine(4, this.value)" type="radio" value="c" name="q4">Aceita ambas <br>
  <input onclick="Engine(4, this.value)" type="radio" value="d" name="q4">Rejeita Ambas</p>
  </center></div>

<p><strong>5. O professor gostaria de saber se a média de74 obtida no
  teste ralizado com 50 alunos era igual a média histórica 68. O desvio padrão foi 17.
  Formule a hipótese e indique a conclusão? Use o gráfico acima para os cálculos, </strong><br>
  <input onclick="Engine(5, this.value)" type="radio" value="a" name="q5">Aceita H0<br>
  <input onclick="Engine(5, this.value)" type="radio" value="b" name="q5">Rejeita H0<br>
  <input onclick="Engine(5, this.value)" type="radio" value="c" name="q5">Aceita ambas <br>
  <input onclick="Engine(5, this.value)" type="radio" value="d" name="q5">Rejeita Ambas </p>

<p><strong>6. O que aconteceria no exemplo da pergunta 4 se&nbsp; o desvio padrão fosse
  aumentado para 3.5?</strong><br>
  <input onclick="Engine(6, this.value)" type="radio" value="a" name="q6">Aumentaria o valor
  de Z e, consequentente, rejeitaria H0<br>
  <input onclick="Engine(6, this.value)" type="radio" value="b" name="q6">Diminuiria o valor
  de Z e, consequentente, aceitaria H0<br>
  <input onclick="Engine(6, this.value)" type="radio" value="c" name="q6">Diminuiria o valor
  de Z e, consequentemente, rejeitaria H0<br>
  <input onclick="Engine(6, this.value)" type="radio" value="d" name="q6">O valor de Z
  permaneceria inalterado</p>
  <p>&nbsp;</p>

  <p><strong>7. O que aconteceria no exemplo da pergunta 5 se&nbsp; o número de
  observações fosse a metade e o desvio padrão aumentasse em uma unidade ?</strong><br>
  <input onclick="Engine(7, this.value)" type="radio" value="a" name="q7">Aumentaria o Valor
  de Z e, consequentente, rejeitaria H0<br>
  <input onclick="Engine(7, this.value)" type="radio" value="b" name="q7">Aumentaria o Valor
  de Z e, consequentemente, aceitaria H0<br>
  <input onclick="Engine(7, this.value)" type="radio" value="c" name="q7">Dimunuiria Z e,
  consequentemente,&nbsp; aceitaria H0<br>
  <input onclick="Engine(7, this.value)" type="radio" value="d" name="q7">A conclusão seria
  em favor de HA</p>

  <p><strong>8. Deseja-se testar uma hipótese que uma determinada dieta faz com que as
  pessoas percam 10 Kg de peso em um período de 5 meses, Uma amostra tirada ao acaso de 50
  pessoas revelou que as pessoas entrevistadas perderam na média 12,5 Kg no período de 5
  meses, O desvio padrão na amostra foi de 1 Kg,&nbsp; Portanto, a hipótese nula é que a
  média é igual a 10 e a hipótese alternativa é que a média é diferente de 10, O valor
  encontrado de t foi de -3,25 e valor de p foi de 0,0021, Na figura encontra-se
  representada a probabilidade de t, <img height="104" alt="a04.jpg (3382 bytes)"
  src="a04.jpg" width="228"> </strong><br>
  <input onclick="Engine(8, this.value)" type="radio" value="a" name="q8">O valor de p
  sugere que a hipótese nula seja aceita<br>
  <input onclick="Engine(8, this.value)" type="radio" value="b" name="q8">O valor de p
  sugere que a hipótese nula seja rejeitada<br>
  <input onclick="Engine(8, this.value)" type="radio" value="c" name="q8">O valor de p
  sugere que o tamaho da amostra é muito pequeno<br>
  <input onclick="Engine(8, this.value)" type="radio" value="d" name="q8">O valor de t
  sugere que o estudo deveria ser conduzido por mais tempo</p>

  <p><strong>9. Um estudo foi feito em um forno em uma fábrica tendo como variável a
  temperatura do forno durante o funcionamento, Entre uma grande quantidade de dados
  escolheram 14 ao acaso, Os dados são apresentados em graus Celsius (C), A temperatura
  normal do funcionamento do forno seria 98,6, Teste a hipótese que a temperatura dos
  experimentos não é diferente da temperatura normal usando alfa=0,05, As 14 temperaturas
  foram,&nbsp; </strong></p>
  <p><font face="Arial"><strong>99,20 99,0 98,2 96,8 98,6 98,0 97,6 97,8 98,4 99,0 98,0 98,2
  98,6 98,6</strong></font></p>
  <p><strong>A temperatura média foi 98,72 e o desvio padrão 0,616, O valor encontrado de
  t foi de -1,94 e valor de p foi de 0,0676, Na figura, encontra-se representada a
  probabilidade de t,</strong><br>
  <img height="135" alt="a05.jpg (4667 bytes)" src="a05.jpg" width="245"></p>
  <p><input onclick="Engine(9, this.value)" type="radio" value="a" name="q9">O valor de p
  sugere que a temperatura do forno equivale a temperatura normal<br>
  <input onclick="Engine(9, this.value)" type="radio" value="b" name="q9">O valor de p
  sugere que a temperatura média do forno é estatiscamente diferente da temperatura
  normal,<br>
  <input onclick="Engine(9, this.value)" type="radio" value="c" name="q9">O valor de p
  sugere que o tamaho da amostra é muito pequeno<br>
  <input onclick="Engine(9, this.value)" type="radio" value="d" name="q9">O valor de t
  sugere que o estudo deveria ser conduzido por mais tempo</p>

  <p><strong>&nbsp;</strong><img height="72" alt="a03.jpg (4645 bytes)" src="a03.jpg"
  width="299"> <strong>10. A figura ao lado descreve duas amostras, Pelo que você aprendeu
  até agora na disciplina de estatística, qual seria valor de aproximado de p?</strong><br>
  <input onclick="Engine(10, this.value)" type="radio" value="a" name="q10">0,01<br>
  <input onclick="Engine(10, this.value)" type="radio" value="b" name="q10">0,51<br>
  <input onclick="Engine(10, this.value)" type="radio" value="c" name="q10">0,99<br>
  <input onclick="Engine(10, this.value)" type="radio" value="d" name="q10">0,05</p>

  <p><strong>11. Um pesquisador deseja comparar a nota de matemática com os estudantes de
  duas salas de aula do mesmo curso. Qual é o melhor teste a aplicar?</strong><br>
  <input onclick="Engine(11, this.value)" type="radio" value="a" name="q11">Qui-quadrado<br>
  <input onclick="Engine(11, this.value)" type="radio" value="b" name="q11">Binomial
  bicaudal<br>
  <input onclick="Engine(11, this.value)" type="radio" value="c" name="q11">Caixa de bigodes
  proporcional<br>
  <input onclick="Engine(11, this.value)" type="radio" value="d" name="q11">Teste t na
  diferença de médias&nbsp; </p>
  <p>&nbsp;</p>

  <div align="center"><center><p><input onclick="Score()" type="button"
  value="Qual foi o meu resultado?"> </p>
  </center></div>
</form>
</div>
</body>
</html>

Last edited by rwar; May 23, 2002 at 06:40.
rwar is offline   Reply With Quote
 

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 23:36.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved