answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Llana [10]
2 years ago
4

estion 2. Using a simulation with 10,000 trials, assign num_different to the number of times, in 10,000 trials, that two words p

icked uniformly at random (with replacement) from Pride and Prejudice have different lengths. Hint 1: What function did we use in section 1 to sample at random with replacement from an array? Hint 2: Remember that != checks for non-equality between two items.
Mathematics
1 answer:
aalyn [17]2 years ago
6 0

Answer:

Done using Python programming language

# Python function to simulate 10000 trials for two words to be picked

# Comments are used for explanatory purpose

# Program starts here

Testsword = open('PrideAndPrejudice.txt', encoding='utf-8').

read()

#The following line split the Testword

splitwords = np.array(Testword.split())

In []:

# we'll make use of a temporary variable here. It'll be Initialise to 0

Temp = 0

# Here, the number of trials will be initialised to 0

Init = 10000l0

# Start iteration to search for possible words in PrideAndPrejudice

for count in np.arange(Init):

# search for 2 words

Splitted = np.random.choice(Testword, 2)

#implement the condition in hint above

iflen(Splitted.item(0)) != len(Splitted.item(1)) != len(Spliitem(2)) != len(words.item(0)):

#calcuate result

Temp = Temp + 1

num_different = Temp/Init

You might be interested in
What is the equation of a line that is parallel to the line 2x + 5y = 10 and passes through the point (–5, 1)? Check all that ap
Bond [772]

So the right options are:

y=-\frac{2}{5}x-1

2x+5y = -5

y-1=-\frac{2}{5}(x+5)

Further explanation:

Given equation of line is:

2x+5y=10

We have to convert it into point-slope form

2x+5y=10\\5y=-2x+10\\Dividing\ both\ sides\ by\ 5\\y=-\frac{2}{5}x+\frac{10}{5}\\y=-\frac{2}{5}x+2

The co-efficient of x is the slope of the line

So,

m= -\frac{2}{5}

As the required line is parallel to given line, it will also have same slope.

Let m1 be the slope of required line

Then the line will be:

y=m_1x+b

Putting the value of slope

y=\frac{2}{5}x+b

Putting (-5,1) in the equation to find the value of b

1=-\frac{2}{5}(-5)+b\\1=2+b\\b=1-2\\b=-1

Putting the values of slope and b in equation

y=-\frac{2}{5}x-1

Multiplying the whole equation by 5 will give us:

5y = -2x-5

2x+5y = -5

Another form of equation of line is Point-slope form

y-y_1=m(x-x_1)

Putting the values of slope and point in the equation, we get

y-1=-\frac{2}{5}(x+5)

So the right options are:

y=-\frac{2}{5}x-1

2x+5y = -5

y-1=-\frac{2}{5}(x+5)

Keywords: Point-Slope form, Parallel lines

Learn more about point slope form at:

  • brainly.com/question/4464845
  • brainly.com/question/4522984

#LearnwithBrainly

4 0
2 years ago
Read 2 more answers
Owen and his friend Kayden are going to a carnival that has games and rides. Owen played 5 games and went on 6 rides and spent a
djyliett [7]
Owen: 5x + 6y = $28.75
kayden; 4x + 3y= $16.25
that’s all i know, sorry
7 0
2 years ago
Jessica was sitting in row 9, seat 3 at a soccer game when she discovered her ticket was for row 1, seat 1. Write a rule to desc
Westkost [7]

rule is to  shift 8 units left & , shift 2 units down , Correct option C)  T<-8,-2> (Jessica) ,

<u>Step-by-step explanation:</u>

Here we have , Jessica was sitting in row 9, seat 3 at a soccer game when she discovered her ticket was for row 1, seat 1. We need to Write a rule to describe the translation needed to put her in the proper seat. Let's do this:

Suppose the above problem in coordinate system where we have a point P(9,3) , And we need to write rule for translation of this point to Q(1,1) .

Let , (x,y)=(9,3) , Now shift 8 units left i.e.

⇒  (x,y)=(9,3)

⇒  (x-8,y)=(9-8,3)

⇒  (x-8,y)=(1,3)

Now , shift 2 units down i.e.

⇒  (x-8,y)=(1,3)

⇒  (x-8,y-2)=(1,3-2)

⇒  (x-8,y-2)=(1,1)

Therefore , rule is to  shift 8 units left & , shift 2 units down , Correct option C)  T<-8,-2> (Jessica) ,

4 0
2 years ago
Which shows the correct substitution of the values a, b, and c from the equation 0 = – 3x2 – 2x + 6 into the quadratic formula?
balandron [24]
          ____________
2 +- <span>√-2^2 - 4(-3)(6) )
------------------------------
              2(-3)</span>
5 0
2 years ago
Read 2 more answers
What is the officer-to-inmate ratio of a facility with 1221 inmates and one-third as many officers?
lions [1.4K]

Answer:

3/1

Step-by-step explanation:

you start off with finding one third of 1221

once you find the answer you make a fraction 1221/407

you simplify this faction as low as it goes and then you have your ratio

you can write it in multiple forms

3/1

3:1

3 is to 1


4 0
2 years ago
Other questions:
  • an apple Orchard sells apples in bags of 10. the orchard sold a total of 2,430 apples one day. how many bags of apples was this
    6·2 answers
  • Find the value of z such that 0.76980.7698 of the area lies between −z−z and z. round your answer to two decimal places.
    15·2 answers
  • The histogram shows the number of chicks born to non-migratory Canada geese in a city park, with the horizontal axis representin
    9·2 answers
  • vector u is represented by the directed line segment RS and vector v is represented by the directed line segment OP. if R=(8,-2)
    13·1 answer
  • Ann's car can travel 228 miles on 6 gallons of gas. a. Write an equation to represent the distance, y, in miles Ann's car can tr
    12·1 answer
  • According to Pizza Marketing Quarterly, the number of U.S. Domino's Pizza stores grew from 4,818 stores in 2001 to 4,986 stores
    11·1 answer
  • 30 POINTS PLZ HELP ME!!!!
    10·2 answers
  • A concert promoter sells tickets and has a​ marginal-profit function given​ below, where Upper P prime (x )is in dollars per tic
    10·1 answer
  • Which equation is y = 3(x – 2)2 – (x – 5)2 rewritten in vertex form? Y = 3 (x minus seven-halves) squared minus StartFraction 27
    15·2 answers
  • A lotion is made from an oil blend costing $1.50 per ounce and glycerin costing $1.00 per ounce. Four ounces of lotion costs $5.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!