软件包导致我的代码无法编译

软件包导致我的代码无法编译

在我添加两个包之前,代码运行良好

`\usepackage{tikz}
\usepackage{pgfplots}`

我使用的是 TeXstudio 2.9.4。这是我运行这两个软件包后的屏幕截图。enter image description here

\documentclass[12pt,addpoints,answers]{exam}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{array}
\usepackage{textcomp}


%The alignment of the cells could be changed by using the package tabularx and define three new row-types:
\usepackage{tabularx}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}

\begin{document}

\printanswers

%this is the hedder
\pagestyle{headandfoot}
\firstpageheader{Math 115}{First Exam}{July 4, 1776}
\runningheader{}
\firstpagefooter{}{}{}
\runningfooter{}{}{}






%this is the box and name
\begin{center}
    \fbox{\fbox{\parbox{5.5in}{\centering
                Answer the questions in the spaces provided on the
                question sheets.}}}
\end{center}
\vspace{0.1in}
\makebox[\textwidth]{Name and section:\enspace\hrulefill}
\vspace{0.2in}
\makebox[\textwidth]{Instructor's name:\enspace\hrulefill}






% my questions
% question number 1

\begin{questions}
    \question[8]
    For parts a-d determine the Level of Measurement of each of the following data sets below as either ``nominal level'', ``ordinal level'', ``interval level'', or ``ratio level''.


\begin{parts}   
    \part{}
        Your score on an individual intelligence test as a measure of your intelligence.\\
        \begin{oneparcheckboxes}
        \choice Nominal
        \choice Ordinal
        \choice Interval
        \choice Ratio

    \end{oneparcheckboxes}


    \part{}
        The amount of caffeine in a cup of Starbucks coffee.\\
        \begin{oneparcheckboxes}
            \choice Nominal
            \choice Ordinal
            \choice Interval
            \choice Ratio

        \end{oneparcheckboxes}

    \part{}
        The names of the counties in a state.\\
        \begin{oneparcheckboxes}
            \choice Nominal
            \choice Ordinal
            \choice Interval
            \choice Ratio

        \end{oneparcheckboxes}


    \part{}
        Positions for gold, silver, and bronze, in a horse race.\\
        \begin{oneparcheckboxes}
            \choice Nominal
            \choice Ordinal
            \choice Interval
            \choice Ratio

        \end{oneparcheckboxes}


    \end{parts}



% question number 2
    \question
    Label the following as discrete or continuous.


\begin{parts}   

\part{}
Number of coins in a stack\fillin[][2in]



\part
Price of diamonds at the mall\fillin[][2in]

\part{}
Gallon of water\fillin[][2in]



\part{}
Number of timed horse races\fillin[][2in]


\end{parts} 

% question 3
\question
Use the attached copy of Table I from appendix A of the book and the given frame below to select a simple random sample of size 6 from the given frame.  Assume that the random starting point (i.e. seed) in the table is row 19 and column 02. Fill in the six blanks with the appropriate numbers only.\\

Sample: $\rule{1cm}{0.15mm}$ 
$\rule{1cm}{0.15mm}$ 
$\rule{1cm}{0.15mm}$ 
$\rule{1cm}{0.15mm}$ 
$\rule{1cm}{0.15mm}$ 
$\rule{1cm}{0.15mm}$ 

\begin{multicols}{4}
    \begin{enumerate}
        \item Alex Fairview
        \item Alvin Harris                                   
        \item Betty Crocker                                 
        \item Betty Davis                                     
        \item Candice Bergman                           
        \item Charlie Brown  
        \item David Duke                                     
        \item Dorothy Oz                                     
        \item Elbert Ellis
        \item George Wallace
        \item Harry Potter  
        \item Henry Hobbs
        \item Jack Jillabeans                              
        \item Jeremy Potts                                 
        \item Jimmy Jones                                 
        \item Johnny Rotten
        \item Kelly Ripa
        \item Kenny Rogers
        \item LennyLungworth
        \item MannyRestinghouse
        \item Nancy Drew  
        \item Nillie Willie
        \item Papa Jones
        \item Pedro Martinez
        \item Pesky  Fly
        \item Pops Racer
        \item RickSpringfield  
        \item RodneyDangerfield
        \item Sandy Cheeks 
        \item Selmer Dukes                    
    \end{enumerate}
\end{multicols}


%question 4
\question
Identify which type of sampling technique is used below for the given scenario: ``Systematic'', ``Cluster'', ``Stratified'', ``Convenience'', or ``Simple Random''.



    \begin{parts}   

\part{}
Draw a simple random sample of two groups of animals from four groups, and construct a sample of 20 animals by including all the animals in the sampled groups.\\ 

\fillin[][2in]


\part{}
A retailer samples 25 receipts from the past week by numbering all the receipts, generating 25 random numbers, and sampling all the receipts that correspond to these numbers.\\

\fillin[][2in]


\part{}
A cell phone company wants to draw a sample of 600 customers to gather opinions about potential new features on upcoming phone models. The company draws a random sample of 200 from customers with Blackberry phones, a random sample of 100 from customers with LG phones, a random sample of 100 from customers with Samsung phones, and a random sample of 200 from customers with other phones.  \\ 

\fillin[][2in]




\part{}
Choose a random number between 1 and 5. Include the animal with that number in your sample, along with every fifth animal thereafter, to construct a sample of eight animals.\\ 

\fillin[][2in]



\part{}
All the customers who entered a store on a particular day were given a survey to fill out concerning their opinions of the service at the store. \\ 

\fillin[][2in]


\end{parts} 



%question 5
\question
Suppose you wanted to obtain a systematic sample of size 60 from a population of size 2,400.  

\begin{parts}   

\part{}
Determine the size of $ k $ so that starting from a random starting point you will be selecting every $ k^{th} $ member from the population to make your sample.\\

\fillin[][2in]\\

\newpage

\part{}
Suppose that the random starting point (which was chosen as a random number between 1 and k)  is given to be p = 21,  then based on this random starting point and the value of   you computed in part a above, fill in the following places in sequence that correspond to the 60 selected items from the population that will make up your sample:\\

$\rule{1cm}{0.15mm}$,$\rule{1cm}{0.15mm}$ ,$ \cdots $,$\rule{1cm}{0.15mm}$ 

(Where the first blank is for the first select member of the sample, the second blank is for the second selected member of the sample, and the last blank is for the $ 60^{th} $ and final selected member of the sample).  

\end{parts}



%question 6
\question
Consider the following sorted quantitative data set that was obtained from a sample taken from a larger population. The data represent the number of times a person logs on a particular website. 46, 51, 61, 61, 62, 64, 72, 73, 73, 74, 75, 77, 78, 79, 80, 80, 82, 82, 82, 87, 88


\begin{parts}

    \part{}
    Construct both a frequency distribution table and a relative frequency distribution table for the data set above given the following 5 classes: $  40-49, 50-59, 60-69,  
    70-79, 80-89 $ (ROUND ALL VALUES TO THE NEAREST HUNDERDTH)


    \begin{tabular}{|c|c|c|}
        \hline Classes & Frequency  & Relative Frequency \\ 
        \hline  &  &  \\ 
        \hline  &  &  \\ 
        \hline  &  &  \\ 
        \hline  &  &  \\ 
        \hline  &  &  \\ 
        \hline 
    \end{tabular} 

    \part{}
    What is the class width? \\ 

    \fillin[][2in]
    \part{}
    Is this data discrete data or continuous data? \\ 

    \fillin[][2in]

    \part{}
    Construct a frequency histogram from the frequency distribution chart you constructed in part a. Be sure to label the classes and the X and Y axis appropriately.  

%this is my graph
\begin{figure}[h]
\centering
\includegraphics[width=0.3\linewidth]{"../../../Pictures/image for test 1 math 1530"}
\caption{Frequency Histrogram}
\label{fig:imagefortest1math1530}
\end{figure}

    \part{}
    Determine whether the shape of the frequency distribution for this problem is more 
    ``Bell Shaped Symmetric'', ``Left Skewed'', or ``Right Skewed''.\\

     \fillin[][2in]



    \part{}
    Find the Mean, Median, and Mode of the given data set for problem. Round to two decimal places. Here is the data set again:  46, 51, 61, 61, 62, 64, 72, 73, 73, 74, 75, 77, 78, 79, 80, 80, 82, 82, 82, 87, 88 \\

    Mean $\rule{1cm}{0.15mm}$ Median $\rule{1cm}{0.15mm}$ Mode $\rule{1cm}{0.15mm}$ 


    \part{}
    Does the Mean and Median from part (e) above also support your answer to part (f) of this same problem?  Please also provide a brief explanation with your answer.\\

    \fillin[][6in]

\end{parts}



%question 7
\question
Given the following pie chart representing the various political affiliations for some random sample of students at some local college in town, then answer the following questions:

\begin{figure}[h]
\centering
\includegraphics[width=0.5\linewidth]{"../../../Pictures/image2 for test 1 math 1530"}
\caption{Pie Chart}
\label{fig:image2fortest1math1530}
\end{figure}


\begin{parts}

    \part
    Which political affiliation was the most represented within the student body that was surveyed?  Which of the four categories was the least represented?\\

    Most $\rule{4cm}{0.15mm}$ Least $\rule{4cm}{0.15mm}$

    \part
    If 500 students were surveyed, then how many more of them identified themselves as Democrats verses Not Affiliated?\\

     $\rule{4cm}{0.15mm}$


\end{parts}


\newpage

%question 8
\question
Car Sales: A car salesman records the number of cars he sold each week for the past year. The following frequency histogram shows the results.

\begin{figure}[h]
\centering
\includegraphics[width=0.5\linewidth]{"../../../Pictures/image3 for test 1 math 1530"}
\caption{}
\label{fig:image3fortest1math1530}
\end{figure}


\begin{parts}

    \part
    What is the most frequent number of cars sold in a given week? \fillin

    \part
    For how many weeks were two cars sold? \fillin

    \part
    Determine the percentage of time two cars were sold. \fillin    

    \part
    How many weeks did the lot sell zero cars? \fillin

    \part
    How many weeks did the lot sell more than seven cars? \fillin

\end{parts}


%question 9
\question
Suppose the following data set comes from a sample that was taken from a larger population:    2, 4, 7, 11

\begin{parts}

    \part
    Calculate the Range of the data set. \fillin

    \part
    Calculate both the Variance and the Standard Deviation of the raw data set showing all computations.

    \begin{tabular}{|C{2cm}|C{2cm}|C{2cm}|C{2cm}|}
        \hline $ x_{i} $ & $ \bar{x} $ & $ x_{i}-\bar{x} $ & $ (x_{i}-\bar{x})^{2} $ \\
        \hline  &  &  &  \\ 
        \hline  &  &  &  \\ 
        \hline  &  &  &  \\ 
        \hline  &  &  &  \\ 
        \hline 
    \end{tabular} 
\\
\bigskip

    Mean $\rule{1.5cm}{0.15mm}$ Variance $\rule{1.5cm}{0.15mm}$ Standard Deviation $\rule{1.5cm}{0.15mm}$   


\end{parts}

\newpage

%question 10
\question
Calculate the mean, variance, and standard deviation for the following grouped data table. The data set comes from a sample.


\begin{parts}

    \part
    Find the mean.

    \begin{tabular}{|L{2cm}|C{2cm}|C{2cm}|C{2cm}|}
        \hline Class & $ f_{i} $ & $ x_{i} $ & $ f_{i}\bullet x_{i} $   \\
        \hline $ 1-4.9 $  &  &  &  \\ 
        \hline $ 5-8.9 $  &  &  &  \\ 
        \hline $ 9-12.9 $ &  &  &  \\ 
        \hline

    \end{tabular} 

    \bigskip

    Mean $\rule{1.5cm}{0.15mm}$     

    \vspace{2 in}

    \part
    Find the variance and standard deviation.


    \begin{tabular}{|L{1.5cm}|C{1.5cm}|C{1.5cm}|C{1.5cm}|C{1.5cm}|C{1.5cm}|C{2.5cm}|}
        \hline Class & $ f_{i} $ & $ x_{i} $ & $ \bar{x} $ & $ x_{i}-\bar{x} $ & $ (x_{i}-\bar{x})^{2} $ & $ (x_{i}-\bar{x})^{2} \bullet f_{i} $ \\
        \hline $ 1-4.9 $  &  &  & & & & \\ 
        \hline $ 5-8.9 $  &  &  & & & & \\ 
        \hline $ 9-12.9 $ &  &  & & & & \\ 
        \hline

    \end{tabular} 


        \bigskip

        variance $\rule{1.5cm}{0.15mm}$ Standard Deviation $\rule{1.5cm}{0.15mm}$   



\end{parts}



\end{questions}




\end{document}

答案1

当我取出以下代码时,我的文档编译成功了。我不知道为什么这可以解决问题。

%this is the hedder
\pagestyle{headandfoot}
\firstpageheader{Math 115}{First Exam}{July 4, 1776}
\runningheader{}
\firstpagefooter{}{}{}
\runningfooter{}{}{}

相关内容